Press ENTER in EVENT mode

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Press ENTER in EVENT mode

by ni_soros on Tue Aug 05, 2014 2:12 pm

I am recording entering tasks into a list on Wunderlist. Here is the code that I have come up with:

Code: Select all
VERSION BUILD=8820413 RECORDER=FX
EVENT TYPE=MOUSEDOWN SELECTOR="#tasks>DIV>DIV>INPUT" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#tasks>DIV>DIV>INPUT" CHARS="asdf"
EVENT TYPE=KEYPRESS SELECTOR="#tasks>DIV>DIV>INPUT" KEY=13


As you can see by the "KEY=13" bit on the last line (aka the ENTER key), it has recorded the ENTER keystroke. However, when I play the macro, it doesn't work. It will only enter "asdf" into the text field and stop there.
ni_soros
 
Posts: 4
Joined: Mon Jul 21, 2014 12:05 pm

Re: Press ENTER in EVENT mode

by chivracq on Tue Aug 05, 2014 2:54 pm

ni_soros wrote:I am recording entering tasks into a list on Wunderlist. Here is the code that I have come up with:

Code: Select all
VERSION BUILD=8820413 RECORDER=FX
EVENT TYPE=MOUSEDOWN SELECTOR="#tasks>DIV>DIV>INPUT" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#tasks>DIV>DIV>INPUT" CHARS="asdf"
EVENT TYPE=KEYPRESS SELECTOR="#tasks>DIV>DIV>INPUT" KEY=13


As you can see by the "KEY=13" bit on the last line (aka the ENTER key), it has recorded the ENTER keystroke. However, when I play the macro, it doesn't work. It will only enter "asdf" into the text field and stop there.

I could reproduce indeed... Easy Workaround is to press the 'Left Arrow' (=37) just before hitting the 'Enter' Key:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
EVENT TYPE=MOUSEDOWN SELECTOR="#tasks>DIV>DIV>INPUT" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#tasks>DIV>DIV>INPUT" CHARS="asdf"
'EVENT TYPE=KEYPRESS SELECTOR="#tasks>DIV>DIV>INPUT" KEY=13
EVENTS TYPE=KEYPRESS SELECTOR="#tasks>DIV>DIV>INPUT" KEYS="[37,13]"

Tested on iMacros v8.8.2 for FF, Pale Moon v24.7.0 (=FF31), WinXP SP3.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Press ENTER in EVENT mode

by ni_soros on Sun Aug 10, 2014 7:58 am

Excellent! Works perfectly. Thank you very much.

Did you figure this out just by messing around with it, or is there a method to the madness?
ni_soros
 
Posts: 4
Joined: Mon Jul 21, 2014 12:05 pm

Re: Press ENTER in EVENT mode

by chivracq on Sun Aug 10, 2014 9:02 am

ni_soros wrote:Excellent! Works perfectly. Thank you very much.

Did you figure this out just by messing around with it, or is there a method to the madness?

Yes and Yes...! The Method is to creatively mess around with iMacros, that's how I got all my knowledge of iMacros... :oops:

Other inspiring Reading for you if you want to acquire some more insight in the EVENT Mode:
- Re: Feedback and Issues on EVENT Recording Mode.

Think of adding "[Solved]" to your Thread Title, that makes it easier to find for other Users...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Press ENTER in EVENT mode

by ni_soros on Sun Aug 10, 2014 10:13 am

Very good. thanks for the tips.

While this is working for the script I just posted above, I wrote another one, for adding someone to a list on Wunderlist. It was working about 50% of the time.

Code: Select all
VERSION BUILD=8820413 RECORDER=FX
EVENT TYPE=CLICK SELECTOR="#tasks>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV>A" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#modals>DIV>DIV>DIV>DIV>DIV:nth-of-type(3)>DIV>DIV>INPUT" CHARS="youremail@gmail.com"
EVENTS TYPE=KEYPRESS SELECTOR="#modals>DIV>DIV>DIV>DIV>DIV:nth-of-type(3)>DIV>DIV>INPUT" KEYS="[37,13]"


I wonder if it is simply a question of the time in between typing the last letter and pressing ENTER. Maybe the Left Arrow does the same thing as a half-second delay. I would like to test this soon, when I've got another bit of free time. :)
ni_soros
 
Posts: 4
Joined: Mon Jul 21, 2014 12:05 pm

Re: Press ENTER in EVENT mode

by techimac on Sat Apr 16, 2016 3:57 am

How to press Down Arrow or Page Down key?
techimac
 
Posts: 189
Joined: Fri Feb 20, 2015 2:27 pm

Re: Press ENTER in EVENT mode

by thecoder2012 on Sat Apr 16, 2016 1:33 pm

techimac wrote:How to press Down Arrow or Page Down key?

' Page Down '
EVENT TYPE=KEYPRESS SELECTOR=* KEY=34

And in a row:
' Page Down '
EVENTS TYPE=KEYPRESS SELECTOR=* KEYS="[34,34,34,34,34,34,34,34,34,34,34]"

And with arrow keys:
' Down (arrow)
EVENT TYPE=KEYPRESS SELECTOR=* KEY=40

' Down (arrow)
EVENTS TYPE=KEYPRESS SELECTOR=* KEYS="[40,40,40,40,40,40,40]"

See viewtopic.php?f=11&t=25239&p=68857#p68857
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me!
User avatar
thecoder2012
 
Posts: 109
Joined: Sat Aug 15, 2015 10:14 am
Location: Internet

Re: Press ENTER in EVENT mode

by techimac on Sat Apr 16, 2016 1:38 pm

I tried same in twitter but didn't worked.
techimac
 
Posts: 189
Joined: Fri Feb 20, 2015 2:27 pm

Re: Press ENTER in EVENT mode

by thecoder2012 on Sat Apr 16, 2016 1:55 pm

techimac wrote:I tried same in twitter but didn't worked.

Please use this thread for twitter: viewtopic.php?f=11&t=25239&p=68861#p68861
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me!
User avatar
thecoder2012
 
Posts: 109
Joined: Sat Aug 15, 2015 10:14 am
Location: Internet


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 13 guests

-->