How to add text without deleting previous text in the text box?

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
Post Reply
aniruddha_mohod
Posts: 3
Joined: Wed Mar 13, 2019 5:35 am

How to add text without deleting previous text in the text box?

Post by aniruddha_mohod » Thu Mar 14, 2019 5:43 am

I want to create a macro which will not delete the previous text in the text box. For example, I have created this

VERSION BUILD=10021450
FRAME F=1
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness CONTENT=APP<SP>for<SP>state<BR>Accused<SP>present<BR>Case<SP>for<SP>Evidence

I want to add similar text in the same text box. I have searched but could not find satisfactory result.

Please help.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to add text without deleting previous text in the text box?

Post by chivracq » Thu Mar 14, 2019 7:31 pm

aniruddha_mohod wrote:
Thu Mar 14, 2019 5:43 am
I want to create a macro which will not delete the previous text in the text box. For example, I have created this

Code: Select all

VERSION BUILD=10021450
FRAME F=1
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness CONTENT=APP<SP>for<SP>state<BR>Accused<SP>present<BR>Case<SP>for<SP>Evidence
I want to add similar text in the same text box. I have searched but could not find satisfactory result.

Please help.
(F)CIM...! :mrgreen: (Read my Sig...)
=> iMacros for FF v10.0.2, 'Free'/'PE'...?, FF65...?, OS...?

Yeah well if the previously entered Text gets automatically selected (and replaced) when you try to add some more Content, you would "normally" use the 'EVENT' Mode to deselect the Content and to jump to the end of that Text, but you seem to be using v10.0.2 for FF and the 'EVENT' Mode is not supported in that Version.

The way to go is then to re-extract that Content to store it in a Var and using 'EVAL()' or 'ADD' to append your new Content to that Var:

Code: Select all

VERSION BUILD=10021450
FRAME F=1
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness CONTENT=APP<SP>for<SP>state<BR>Accused<SP>present<BR>Case<SP>for<SP>Evidence
WAIT SECONDS=2
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
ADD !VAR1 <BR><BR>Some<SP>more<SP>Content...
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness CONTENT={{!VAR1}}
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
aniruddha_mohod
Posts: 3
Joined: Wed Mar 13, 2019 5:35 am

Re: How to add text without deleting previous text in the text box?

Post by aniruddha_mohod » Fri Mar 15, 2019 5:33 am

Thank you for you reply. But my problem does not solve by that. My problem is there may be any text in the text box. Or by a macro I will put some text in the text box and by another macro I want that the previous text should remain as it is and some other text get placed in that text box. How can I achieve that.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to add text without deleting previous text in the text box?

Post by chivracq » Fri Mar 15, 2019 5:55 am

aniruddha_mohod wrote:
Fri Mar 15, 2019 5:33 am
Thank you for you reply. But my problem does not solve by that. My problem is there may be any text in the text box. Or by a macro I will put some text in the text box and by another macro I want that the previous text should remain as it is and some other text get placed in that text box. How can I achieve that.
Yeah well, did you try that Script...? :?

And you missed the "(F)CIM" part for me to follow up... :roll:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
aniruddha_mohod
Posts: 3
Joined: Wed Mar 13, 2019 5:35 am

Re: How to add text without deleting previous text in the text box?

Post by aniruddha_mohod » Fri Mar 15, 2019 6:13 am

Thank you for your guidance my problem is solved by the following code

VERSION BUILD=10021450
SET !EXTRACT_TEST_POPUP NO
FRAME F=1
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
ADD !VAR1 Exh.<SP>Hamdast<SP>Application
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness CONTENT={{!VAR1}}
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to add text without deleting previous text in the text box?

Post by chivracq » Fri Mar 15, 2019 6:20 am

aniruddha_mohod wrote:
Fri Mar 15, 2019 6:13 am
Thank you for your guidance my problem is solved by the following code

Code: Select all

VERSION BUILD=10021450
SET !EXTRACT_TEST_POPUP NO
FRAME F=1
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
ADD !VAR1 Exh.<SP>Hamdast<SP>Application
TAG POS=1 TYPE=TEXTAREA FORM=ID:frm ATTR=ID:fbusiness CONTENT={{!VAR1}}
Yeah well, that's exactly the Script I had posted...! 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply