Send ENTER key click

Discussions and Tech Support related to the iMacros Google Chrome extension.
Forum rules
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
olympicpaul
Posts: 3
Joined: Mon Nov 07, 2016 6:15 pm

Send ENTER key click

Post by olympicpaul » Mon Nov 07, 2016 6:22 pm

Is it possible to send an ENTER key click in the Chrome extension version? What would be the code to program in this event?
chivracq
Posts: 8874
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Send ENTER key click

Post by chivracq » Mon Nov 07, 2016 7:57 pm

olympicpaul wrote:Is it possible to send an ENTER key click in the Chrome extension version? What would be the code to program in this event?
FCIM...! :mrgreen:

Yep, it's possible but it will only work if you are using v8.4.4 on CR, you simply record your Action using the EVENT Mode...

But hum, I don't know what you mean exactly by "send an ENTER key click", "Click" is with the Mouse, 'ENTER' is with the Keyboard...! :?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
olympicpaul
Posts: 3
Joined: Mon Nov 07, 2016 6:15 pm

Re: Send ENTER

Post by olympicpaul » Tue Nov 08, 2016 1:06 am

Thanks, let me try to clarify my question. On the web page I am working with there is a javascript that pops up a confirm box. To confirm I can either press the enter key on the keyboard or use the mouse to click the OK box on the confirm popup. Neither of these actions record. (I am using version 844 with Chrome, experimental event recording mode turned on, Windows 10). Is there a way to use iMacros to get this confirm box to return true so things can proceed?
chivracq
Posts: 8874
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Send ENTER

Post by chivracq » Tue Nov 08, 2016 3:11 am

olympicpaul wrote:Thanks, let me try to clarify my question. On the web page I am working with there is a javascript that pops up a confirm box. To confirm I can either press the enter key on the keyboard or use the mouse to click the OK box on the confirm popup. Neither of these actions record.

Code: Select all

(I am using version 844 with Chrome, experimental event recording mode turned on, Windows 10).
Is there a way to use iMacros to get this confirm box to return true so things can proceed?
Oh...!, I nearly didn't read your Reply as your FCI was "hidden" in the middle of your Post...
Always mention your FCI clearly when you open a Thread, preferably at the Top of your Post, I don't read or answer Threads when this required Info is missing, read my Sig..., and CR Version is still missing, CR52/54 I reckon...

>>>

But hum, for your Case, it's because you probably need 'ONDIALOG' to handle the Popup but this Command is unfortunately not supported by iMacros for CR according to the Wiki...

You can indeed try issuing a "generic" 'ENTER' at the Browser/Window Level which might get "interpreted" by the Browser as meant for the Popup:

Code: Select all

EVENT TYPE=KEYPRESS SELECTOR=* KEY=13
And if it doesn't work, you have some older Thread on the Forum about simulating Mouse Clicks and Events from JavaScript, it is linked to from the Wiki Page for the 'CLICK' Command I think, but it's a bit complex and I've never tried implementing it...

And otherwise, use FF or IE which do support 'ONDIALOG'...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
olympicpaul
Posts: 3
Joined: Mon Nov 07, 2016 6:15 pm

Re: Send ENTER key click

Post by olympicpaul » Wed Nov 09, 2016 6:16 pm

Thanks. I couldn't get it to work in Chrome but it was easy in Firefox.
chivracq
Posts: 8874
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Send ENTER key click

Post by chivracq » Wed Nov 09, 2016 8:21 pm

olympicpaul wrote:Thanks. I couldn't get it to work in Chrome but it was easy in Firefox.
Ah, OK, good to hear and Thanks for the Feedback... :D

But, hum..., you didn't mention/confirm your CR Version even if I guess it probably doesn't play a role, CR is a bit less "horrible" at breaking Commands with iMacros than FF is, but I won't react next time you open a new Thread if you don't mention directly your complete FCI...
(I only help Users using the Forum "a bit correctly", and mentioning their FCI in their OP when opening a new Thread or posting for the first time in some existing Thread is one of my "Criteria"... + Neat Follow-up and sharing their Solution in all their Threads, see next Paragraph...)

And you could have given a few more Details than just "I couldn't get it to work in Chrome but it was easy in Firefox."...:
=> + Confirm if it was related to 'ONDIALOG' like I thought.
=> + Mention/confirm if you still had to use the 'EVENT' Mode and/or if it worked as well in the Standard 'TAG' Mode.
=> + You could/should have shared your final Script to make this Thread a bit more useful for other Users searching the Forum with a similar Case.
=> + Mention in which FCI you managed to get it to work in FF.

But OK, never mind, glad your Pb is solved... 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply