How to "navigate" to a text field and insert clipboard content?

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
imacros4me
Posts: 10
Joined: Tue Feb 23, 2021 4:37 pm

How to "navigate" to a text field and insert clipboard content?

Post by imacros4me » Tue Feb 23, 2021 4:55 pm

-imacros for firefox 10.0.2.1450
-Windows 10 Pro
-Firefox 85.0.2 (64-Bit)
-included demo macros work ok

Hello,

this is my first in this forum.
I'd like to use the imacros firefox plugin to automate some admin work in an internet forum.

Where can I find help on how to navigate to a specified text-field on a specified url and to paste the contents of the clipboard?

Thanks a lot for your help.
techimac
Posts: 393
Joined: Fri Feb 20, 2015 9:27 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by techimac » Wed Feb 24, 2021 8:18 am

Refer wiki link for example
but I tested and its not working on iMacros 10 for Chrome

https://wiki.imacros.net/!CLIPBOARD
Available for custom iim, javascript iMacros scripts
imacros4me
Posts: 10
Joined: Tue Feb 23, 2021 4:37 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by imacros4me » Wed Feb 24, 2021 4:38 pm

I'm no programmer but how exactly can I use firefox to discover how to reference the correct textfield in imacros to paste the content of the clipboard?
techimac
Posts: 393
Joined: Fri Feb 20, 2015 9:27 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by techimac » Wed Feb 24, 2021 5:09 pm

{{!clipboard}} variable is used to get clipboard text but
this variable is not working in iMacros 10 for Chrome
so even if you are able to write TAG command to input data
data will still be blank as {{!clipboard}} variable is giving blank

if you need help in writing the command then you have to share the URL.
Available for custom iim, javascript iMacros scripts
techimac
Posts: 393
Joined: Fri Feb 20, 2015 9:27 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by techimac » Wed Feb 24, 2021 5:11 pm

to begin with
click record

input data in text box
stop recording

find TAG command which shows data entered
replace text after "CONTENT=" with "CONTENT={{!clipboard}}"

you can delete other lines of recording
Available for custom iim, javascript iMacros scripts
imacros4me
Posts: 10
Joined: Tue Feb 23, 2021 4:37 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by imacros4me » Sun Feb 28, 2021 1:00 pm

This results in an Error:

RuntimeError: element TEXTAREA specified by TABINDEX:2&&DIR:ltr&&TXT: was not found, line: 4

Line 4 is:

Code: Select all

TAG POS=1 TYPE=TEXTAREA FORM=NAME:input ATTR=TABINDEX:2&&DIR:ltr&&TXT: CONTENT={{!clipboard}}
techimac
Posts: 393
Joined: Fri Feb 20, 2015 9:27 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by techimac » Sun Feb 28, 2021 5:40 pm

need to see URL to check the code
but first check if clipboard will work or not
run this command

prompt {{!clipboard}}

if you see data then worth trying to fix the code
Otherwise you have to use ctrl v command with event mode and your iMacros wont support event mode
Available for custom iim, javascript iMacros scripts
imacros4me
Posts: 10
Joined: Tue Feb 23, 2021 4:37 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by imacros4me » Sun Feb 28, 2021 6:57 pm

I saved your code as Macro and the content of the clipboard was copied successfully.

The error seems to be that the wrong field on the page is selected before pasting the clipboard.

Unfortunately I can't copy the URL because only moderators can access it.
techimac
Posts: 393
Joined: Fri Feb 20, 2015 9:27 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by techimac » Sun Feb 28, 2021 7:27 pm

You can do inspect element and send screenshot
Available for custom iim, javascript iMacros scripts
imacros4me
Posts: 10
Joined: Tue Feb 23, 2021 4:37 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by imacros4me » Sun Feb 28, 2021 9:29 pm

You mean with firefox inspector?
chivracq
Posts: 9721
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to "navigate" to a text field and insert clipboard content?

Post by chivracq » Sun Feb 28, 2021 10:10 pm

You 2 are so funny, ah-ah...!, nearly "cute"... :D

@OP, try to open your Thread in the "correct" Sub-Forum "next time", and you might get some "better" Help... :idea:
... But your whole Thread is a bit "Low Qlt" anyway..., nearly always actually when no URL is posted... :idea:

@techimac is maybe not the most "Advanced" User on the Forum but is at least nicely trying to help you @OP 8) , but hum..., a bit difficult if he can't try/test anything as you didn't provide any URL to test... :idea:
(He's nicer than me actually, as you can see, I didn't try to help, your Scenario was "too vague"... [Well, and I usually don't help for Social Media and posting/commenting on a Forum... :| ])

>>>

About "wrong Sub-Forum", I'm the Mod on this Forum, and who approved your Post/Thread, which I "normally" would have disapproved (until you had opened it in the correct Sub-Forum), but I had very bad/no Internet a few days ago when you posted, so I preferred to approve your Thread directly, as I wasn't "sure" when I would get some Internet again..., or you might have had to wait for 1-2-3 days before I would again have had some Internet to check the Forum again... and approved 1st time Posters... :|

>>>

EDIT: Removed some a bit "unfriendly" Term, oops...! :oops:
Last edited by chivracq on Tue Mar 02, 2021 5:35 pm, edited 1 time in total.
- (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...
techimac
Posts: 393
Joined: Fri Feb 20, 2015 9:27 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by techimac » Sun Feb 28, 2021 11:38 pm

imacros4me wrote:
Sun Feb 28, 2021 9:29 pm
You mean with firefox inspector?
I want to see HTML code of text box

you can try which one fills the box if it does


SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
TAG POS=1 TYPE=TEXTAREA ATTR=* content=1
TAG POS=2 TYPE=TEXTAREA ATTR=* content=2
TAG POS=3 TYPE=TEXTAREA ATTR=* content=3
TAG POS=4 TYPE=TEXTAREA ATTR=* content=4
Available for custom iim, javascript iMacros scripts
imacros4me
Posts: 10
Joined: Tue Feb 23, 2021 4:37 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by imacros4me » Mon Mar 01, 2021 3:39 pm

Hello Admin,

sorry for my LQ thread but you answer ...Hum... is nearly the same level.
If iMacros is intended just for professionals I have to search for another tool because the wiki seems to be for pro's too.

Maybe a little help which forum might be the right one to ask would be supportive anyway?
techimac
Posts: 393
Joined: Fri Feb 20, 2015 9:27 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by techimac » Mon Mar 01, 2021 4:20 pm

try the code I sent
and whichever line fills the data, use it
Available for custom iim, javascript iMacros scripts
imacros4me
Posts: 10
Joined: Tue Feb 23, 2021 4:37 pm

Re: How to "navigate" to a text field and insert clipboard content?

Post by imacros4me » Mon Mar 01, 2021 4:56 pm

Thanks a lot for your patience techimac.

Maybe you're not the Pro like the Admin wrote but at least you tried to help me.
Post Reply