how to make keypress

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
FP4Lisa
Posts: 2
Joined: Sun Jan 20, 2008 10:29 pm

how to make keypress

Post by FP4Lisa » Sun Jan 20, 2008 10:50 pm

hello,

i have an form, there is an input field. i fill out the input field with imacros for firefox. but the input field includes javascript event, it needs an keypress in the inputfield to make the select field fillable wich follows.

how can i make a keypress, like space or keyleft in the inputfield.

here my code:

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:Form ATTR=ID:plz CONTENT={{!VAR4}}
'HERE I NEED A KEYPRESS ... WITHOUT THIS NEXT TAG WONT BE FILLABLE

WAIT SECONDS= 5

TAG POS=1 TYPE=SELECT FORM=NAME:Form ATTR=ID:city CONTENT=${{!VAR5}}
Here the Code of the Website

Code: Select all

<input id="plz" onfocus="javascript:*EVENT*" type="Text"></input>

<select id="city" onChange="javascript:*EVENT*" onfocus="javascript:postaladdress.globalAddressType='postaladdress';" disabled="true" size="1">
<option value="Bitte Ort waehlen" selected>Bitte zuerst die PLZ eingeben!</option>
</select>
hoping for help!
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Wed Jan 23, 2008 3:05 pm

With our business editions you can use the DirectScreen command to simulate a keypress and trigger onfocus "naturally".

However, Firefox should create this event automatically. Can you please post the URL of the web that creates the problem? This would allow us to quickly re-create the issue on our test systems.
OrkyDD
Posts: 11
Joined: Thu Sep 20, 2007 2:57 pm

Re: how to make keypress

Post by OrkyDD » Fri Apr 25, 2008 8:32 pm

This causes the problem. lightbox-shout-filter needs to fire a KeyUp event in order to refilter the results, but nothing happens.

VERSION BUILD=6120228
SET !ERRORCONTINUE YES
SET !TIMEOUT 10
URL GOTO=http://digg.com
TAG POS=1 TYPE=A ATTR=ID:share1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:lightbox-shout-filter CONTENT=A

This seems like it should work, but doesn't:
URL GOTO=javascript:evObj=document.createEvent('KeyEvents');evObj.initKeyEvent('keyup',true,true,window,false,false,false,false,13,0);pmst=$('lightbox-shout-filter').dispatchEvent(evObj);

The URL GOTO causes it to leave the page instead of operating on the dom elements on the page. This problem is specific to FireFox. The standalone browser works as it should.

I'd love to have an answer for this. I want to be able to shout to everyone that meets a filter.
DarrellJ88
Posts: 1
Joined: Mon Mar 15, 2010 2:31 am

Re: how to make keypress

Post by DarrellJ88 » Mon Mar 15, 2010 2:42 am

Hey guys, I'm aware this topic is a few years old, but on most forums they would like you to search and use an existing thread, but then on occasion get mad for bringing up old topics, so I don't know which one to go by lol. :)
Anyhow, is there anyway it is possible to mimic a keypress event with the firefox plugin of iMacros? I see there is some function called DirectScreen, but I also read that doesn't exist with the Firefox plugin.
I have a router that I would like to save password/auto-login to the settings, but it has a bunch of javascript and hashing on the website, so there isn't really anyway I can think of to go around it. Then I thought maybe iMacro would work since it would imitate me typing the keys and I noticed I can bookmark the macro, but I realized the javascript on the page will not recognize the text input of Firefox iMacro.

If it helps, this is the source code of the page for the router.
http://www.textdump.com/v/?k=NTk3Nw==
artb
Posts: 3
Joined: Tue Aug 11, 2009 4:50 pm

Re: how to make keypress

Post by artb » Tue May 18, 2010 9:18 pm

me 2, same problem with firefox: filters needing keypress. any solutions? anyone? anyone? bueller? bueller?
sdrkee
Posts: 4
Joined: Wed May 26, 2010 8:16 am

Re: how to make keypress

Post by sdrkee » Wed May 26, 2010 6:43 pm

I think directscreen is the only option for making this happen. I even want to use some conditional statements to integrate with imacro or imacro scripting. Let's hope if someone give any free solution.
tgandy
Posts: 14
Joined: Wed Nov 04, 2009 8:59 am

Re: how to make keypress

Post by tgandy » Mon Mar 12, 2012 11:07 am

I read DS is available in IE plugin, so installed it and then found in IE8 tabs do not work!

So anyone has a solution for the following scenario, I'd very much appreciate it.

1. Click on Icon on webpage - open new tab with new form
2. Enter value into a dropdown field (e.g. "Air Conditioning")
3. Do a 'down' keypress to select the value in the drop down (note will not always be in the same position as entering "AC" in the field bring all values matching "AC*" in reality.)

I can't do keypress in FF10 and opening the tab in IE8 stops the recording.

All help appreciated.

Andy
iMacros V8, IE8, FF10, Windows 7
Post Reply