ctrl-v in EVENT Mode Doesn't Work

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

ctrl-v in EVENT Mode Doesn't Work

Post by viking » Fri Jun 17, 2016 4:58 am

The following works fine in FF v47 (iMacros 8.9.7, OS WIN7-64bit):
EVENT TYPE=KEYPRESS SELECTOR=* Char="f" MODIFIERS="ctrl"
(it opens the search box with the cursor in the box)

Immediately thereafter, I want past the content of the clipboard into the search box.
I tried this:
EVENT TYPE=KEYPRESS SELECTOR=* Char="v" MODIFIERS="ctrl"
However, nothing is pasted (and the cursor is gone from the search box).

Why can't I paste the clipboard content?

p.s. I also tried the ctrl-v command alone to paste the clipboard content into this topic form. However, nothing was pasted.
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

Re: ctrl-v in EVENT Mode Doesn't Work

Post by viking » Fri Jun 17, 2016 5:38 am

I tried something else: I went to Google and entered "AAA" in the search field.
The following macro command does the same:
'EVENTS TYPE=KEYPRESS SELECTOR="#lst-ib" CHARS="AAA"

However, this doesn't work:
EVENTS TYPE=KEYPRESS SELECTOR=* CHARS="AAA"

Is wild card for the SELECTOR sometimes not allowed?
It works for: EVENT TYPE=KEYPRESS SELECTOR=* Char="f" MODIFIERS="ctrl"

Maybe the SELECTOR needs to be specific when entering text..?
What would the SELECTOR be for the search box?
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: ctrl-v in EVENT Mode Doesn't Work

Post by chivracq » Fri Jun 17, 2016 2:12 pm

viking wrote:The following works fine in FF v47 (iMacros 8.9.7, OS WIN7-64bit):

Code: Select all

EVENT TYPE=KEYPRESS SELECTOR=* Char="f" MODIFIERS="ctrl"
(it opens the search box with the cursor in the box)

Immediately thereafter, I want past the content of the clipboard into the search box.
I tried this:

Code: Select all

EVENT TYPE=KEYPRESS SELECTOR=* Char="v" MODIFIERS="ctrl"
However, nothing is pasted (and the cursor is gone from the search box).

Why can't I paste the clipboard content?

p.s. I also tried the ctrl-v command alone to paste the clipboard content into this topic form. However, nothing was pasted.
viking wrote:I tried something else: I went to Google and entered "AAA" in the search field.
The following macro command does the same:

Code: Select all

'EVENTS TYPE=KEYPRESS SELECTOR="#lst-ib" CHARS="AAA"
However, this doesn't work:

Code: Select all

EVENTS TYPE=KEYPRESS SELECTOR=* CHARS="AAA"
Is wild card for the SELECTOR sometimes not allowed?
It works for:

Code: Select all

EVENT TYPE=KEYPRESS SELECTOR=* Char="f" MODIFIERS="ctrl"
Maybe the SELECTOR needs to be specific when entering text..?
What would the SELECTOR be for the search box?
Yep, normal, for a Paste, some Input Field needs to have the Focus (same thing if you do it manually with Mouse Selection and Keyboard Action)...; with 'SELECTOR=*', iMacros will apply the EVENT Statement at the highest HTML Level possible which is for 'BODY' I think...
=> So it will work for 'Ctrl^f' or 'Ctrl^a', but not for 'Ctrl^v'...
- (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...
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

Re: ctrl-v in EVENT Mode Doesn't Work

Post by viking » Fri Jun 17, 2016 5:56 pm

chivracq wrote: Yep, normal, for a Paste, some Input Field needs to have the Focus (same thing if you do it manually with Mouse Selection and Keyboard Action)...; with 'SELECTOR=*', iMacros will apply the EVENT Statement at the highest HTML Level possible which is for 'BODY' I think...
=> So it will work for 'Ctrl^f' or 'Ctrl^a', but not for 'Ctrl^v'...
So, is there some way to find out what the SELECTOR should be:
1. In the "ctrl-f" search box
2. Google Search field
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: ctrl-v in EVENT Mode Doesn't Work

Post by chivracq » Fri Jun 17, 2016 6:30 pm

viking wrote:
chivracq wrote: Yep, normal, for a Paste, some Input Field needs to have the Focus (same thing if you do it manually with Mouse Selection and Keyboard Action)...; with 'SELECTOR=*', iMacros will apply the EVENT Statement at the highest HTML Level possible which is for 'BODY' I think...
=> So it will work for 'Ctrl^f' or 'Ctrl^a', but not for 'Ctrl^v'...
So, is there some way to find out what the SELECTOR should be:
1. In the "ctrl-f" search box
2. Google Search field
Yep, works for me in the 2 following FCI's:
- iMacros for FF v8.8.2, Pale Moon v26.1.1 (=FF43), Win10-x64.
- iMacros for FF v8.9.6, FF46, Win10-x64.

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
TAB T=1
'URL GOTO=https://www.google.nl/search?q=Cirque+Valentin&ie=utf-8&oe=utf-8&gws_rd=cr&ei=FcthV_qKBILYgAbA_52ABQ
'EVENT TYPE=CLICK SELECTOR="#rhs_block" BUTTON=0
'EVENT TYPE=CLICK SELECTOR="#rcnt" BUTTON=0

'Both following Statements work:
'EVENTS TYPE=KEYPRESS SELECTOR="#gsr" CHARS="fv" MODIFIERS="ctrl"
EVENTS TYPE=KEYPRESS SELECTOR=* CHARS="fv" MODIFIERS="ctrl"
- (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...
viking
Posts: 243
Joined: Sun Mar 16, 2008 7:22 am

Re: ctrl-v in EVENT Mode Doesn't Work

Post by viking » Fri Jun 17, 2016 7:18 pm

chivracq wrote: 'Both following Statements work:

Code: Select all

'EVENTS TYPE=KEYPRESS SELECTOR="#gsr" CHARS="fv" MODIFIERS="ctrl"
EVENTS TYPE=KEYPRESS SELECTOR=* CHARS="fv" MODIFIERS="ctrl"
Great! Didn't think abot doing the f and v at the same time!
(This doesn't work on the Google search field though)

Where did you get #gsr from?
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: ctrl-v in EVENT Mode Doesn't Work

Post by chivracq » Sat Jun 18, 2016 7:32 am

viking wrote:
chivracq wrote: 'Both following Statements work:

Code: Select all

'EVENTS TYPE=KEYPRESS SELECTOR="#gsr" CHARS="fv" MODIFIERS="ctrl"
EVENTS TYPE=KEYPRESS SELECTOR=* CHARS="fv" MODIFIERS="ctrl"
Great! Didn't think abot doing the f and v at the same time!
(This doesn't work on the Google search field though)

Where did you get #gsr from?
"Great! Didn't think abot doing the f and v at the same time!"
=> Oops, always be creative and try all Combinations, ah-ah...!
"Where did you get #gsr from?"
=> Euh..., from my 'URL GOTO' Page, I just clicked somewhere on the most deserted space on the Page..., shouldn't play a role at all, I just left it for you to have an Idea of/on what I try/tried before (hopefully) finding a Solution...

OK, about Google Search, is there any Shortcut to get that Field to get the Focus...?
And when you say 'Google Search Field', I guess you mean the 'Search-Engine-Search-Field' in the 'Navigation Toolbar'...?, if Google is defined as your Default Search-Engine, then it will be Google, otherwise any other Search-Engine...

But sorry, easy Workaround, you just open a 2nd Tab, go to 'google.com' and do your Search...
Hum, unless you really want to preserve/respect the User's Default Search-Engine but you didn't really sound like that by mentioning "Google Search Field", my Answer is already more Generic...
- (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