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

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
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 5:19 pm

Code: Select all

TAG POS=1 TYPE=TEXTAREA ATTR=* CONTENT={{!clipboard}}
Did the job. We're getting closer ;-)
Only line breaks got lost.
Any chance to preserve these when pasting the clipboard?
techimac
Posts: 482
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 5:38 pm

pro is not required.
its a few seconds task.
Available for custom iim, javascript iMacros scripts
techimac
Posts: 482
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 5:41 pm

imacros4me wrote:
Mon Mar 01, 2021 5:19 pm

Code: Select all

TAG POS=1 TYPE=TEXTAREA ATTR=* CONTENT={{!clipboard}}
Did the job. We're getting closer ;-)
Only line breaks got lost.
Any chance to preserve these when pasting the clipboard?
you have to use EVENT Mode and simulate ctrl v windows shortcut to paste
or have to replace some character using EVAL command as new line character and set clipboard

access to URL is better
Available for custom iim, javascript iMacros scripts
techimac
Posts: 482
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 5:44 pm

I belive you are first copying some text in clipboard and then running script

try this
start recording
paste text in textarea

stop recording

use content="" part

no need for clipboard variable

you will be able to retain new line
Available for custom iim, javascript iMacros scripts
techimac
Posts: 482
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 8:19 pm

You can use following examples instead of relying on clipboard

Code: Select all

set !var1 Line<SP>1<br>Line<SP>2
TAG POS=1 TYPE=TEXTAREA ATTR=* CONTENT={{!var1}}

set !var1 "Line<SP>1<br>Line<SP>2'''"
TAG POS=1 TYPE=TEXTAREA ATTR=* CONTENT={{!var1}}

TAG POS=1 TYPE=TEXTAREA ATTR=* CONTENT=Line<SP>1<br>Line<SP>2
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 » Tue Mar 02, 2021 5:10 pm

Do I have to enable EVENT mode?
If the answer is yes, where do I enable it using the FF-version of iMacros?

Thanks again for helping.
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

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

Post by techimac » Tue Mar 02, 2021 6:33 pm

iMacros
Manage
settings
Event recording mode (Under Recorder settings)

If you can tell what you want to input then may be TAG command can do the job
<BR> is for line

Did you tried examples?
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 » Tue Mar 02, 2021 7:21 pm

There is no event mode available to select.
I can only enable "Use CSS selectors" and "Use element ids whenever possible"
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

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

Post by techimac » Tue Mar 02, 2021 10:20 pm

I dont have Firefox
You can use Chrome then
Available for custom iim, javascript iMacros scripts
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

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

Post by techimac » Wed Mar 03, 2021 12:59 am

palemoon browser
iMacros 8.9.7

use this
Available for custom iim, javascript iMacros scripts
rapieragnay
Posts: 11
Joined: Sun Jan 24, 2021 11:06 am

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

Post by rapieragnay » Wed Mar 03, 2021 1:00 pm

Code: Select all

EVENT TYPE=KEYPRESS SELECTOR="TEXTAREA" CHAR="v" MODIFIERS="[CTRL]"
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

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

Post by techimac » Thu Mar 04, 2021 5:49 am

MODIFIERS="ctrl" will work as well
Available for custom iim, javascript iMacros scripts
Post Reply