Storing multiple variables

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
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
Pucca
Posts: 8
Joined: Fri Jan 15, 2016 10:31 am

Storing multiple variables

Post by Pucca » Fri Jan 15, 2016 11:01 am

Hi I'm a newbie at using imacros so I'll start by telling you what I want to accomplish. I want to scrape multiple data on a site and store them into multiple custom variables and lastly paste it into a textbox. Here's my code

Code: Select all

TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://anidb.net/perl-bin/animedb.pl?show=anime&aid=239
TAG POS=3 TYPE=TD ATTR=CLASS:value EXTRACT=TXT
SET title {{!EXTRACT}}
TAG POS=4 TYPE=TD ATTR=CLASS:value EXTRACT=TXT
SET episode {{!EXTRACT}}
TAG POS=5 TYPE=TD ATTR=CLASS:value EXTRACT=TXT
SET date {{!EXTRACT}}
TAG POS=7 TYPE=TD ATTR=CLASS:value EXTRACT=TXT
SET source {{!EXTRACT}}
TAB OPEN
TAB T=2
URL GOTO=http://pastebin.com/
WAIT SECONDS=1
TAG POS=1 TYPE=TEXTAREA FORM=NAME:myform ATTR=NAME:paste_code CONTENT={{title}}->{{episode}}->{{date}}->{{source}}
TAG POS=1 TYPE=TEXTAREA ATTR=NAME:paste_code EXTRACT=TXT
Now the problem is it's variables are appending from the last variable and it also adds the word "[EXTRACT]" which I don't want. How can I get rid of the appended variables and the string "[EXTRACT]"?
Pucca
Posts: 8
Joined: Fri Jan 15, 2016 10:31 am

Re: Storing multiple variables

Post by Pucca » Wed Jan 20, 2016 4:55 am

Since the staff ain't helping so I did more research which took a long time. I finally discovered a fix which is to use the function !CLIPBOARD if that helps for anyone else who has a similar problem as mine :)
chivracq
Posts: 8929
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Storing multiple variables

Post by chivracq » Wed Jan 20, 2016 10:18 am

Pucca wrote:Hi I'm a newbie at using imacros so I'll start by telling you what I want to accomplish. I want to scrape multiple data on a site and store them into multiple custom variables and lastly paste it into a textbox. Here's my code

Code: Select all

TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://anidb.net/perl-bin/animedb.pl?show=anime&aid=239
TAG POS=3 TYPE=TD ATTR=CLASS:value EXTRACT=TXT
SET title {{!EXTRACT}}
TAG POS=4 TYPE=TD ATTR=CLASS:value EXTRACT=TXT
SET episode {{!EXTRACT}}
TAG POS=5 TYPE=TD ATTR=CLASS:value EXTRACT=TXT
SET date {{!EXTRACT}}
TAG POS=7 TYPE=TD ATTR=CLASS:value EXTRACT=TXT
SET source {{!EXTRACT}}
TAB OPEN
TAB T=2
URL GOTO=http://pastebin.com/
WAIT SECONDS=1
TAG POS=1 TYPE=TEXTAREA FORM=NAME:myform ATTR=NAME:paste_code CONTENT={{title}}->{{episode}}->{{date}}->{{source}}
TAG POS=1 TYPE=TEXTAREA ATTR=NAME:paste_code EXTRACT=TXT
Now the problem is it's variables are appending from the last variable and it also adds the word "[EXTRACT]" which I don't want. How can I get rid of the appended variables and the string "[EXTRACT]"?
Pucca wrote:Since the staff ain't helping so I did more research which took a long time. I finally discovered a fix which is to use the function !CLIPBOARD if that helps for anyone else who has a similar problem as mine :)
Yep, sorry, I only read/answer Threads when Users mention their FCI which is Required Info like stated in the Forum Rules for me to respond...

Mention your FCI and I might have some more Insight... (And that would be a Condition as well for me to respond to any (future) Thread(s) of yours...)
All I know is that you are not using CR... (Because '!CLIPBOARD' doesn't work on CR, oops...!)

But neat of you to update your Thread and share your Solution, as that would be one more of my Conditions for future Threads...
- (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