!EXTRACT

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
cietru141
Posts: 3
Joined: Tue Dec 17, 2013 5:41 pm

!EXTRACT

Post by cietru141 » Tue Dec 24, 2013 12:35 am

How can I use EXTRACT to save the values 2.05,3.45 & 3.5 in different variables?And which version of iMacro do I need?Can this work on any browser?
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds1 CONTENT=2.05
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:oddsX CONTENT=3.45
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds2 CONTENT=3.5
chivracq
Posts: 9384
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: !EXTRACT

Post by chivracq » Tue Dec 24, 2013 1:59 am

'TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds1 CONTENT=2.05
SET !EXTRACT NULL
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds1 EXTRACT=TXT
SET !VAR1 !EXTRACT

'TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:oddsX CONTENT=3.45
SET !EXTRACT NULL
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:oddsX EXTRACT=TXT
SET !VAR2 !EXTRACT

'TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds2 CONTENT=3.5
SET !EXTRACT NULL
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds2 EXTRACT=TXT
SET !VAR3 !EXTRACT

(Should work for any Version of iMacros for any Browser...)
- (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...
cietru
Posts: 2
Joined: Tue Dec 17, 2013 5:37 pm

Re: !EXTRACT

Post by cietru » Tue Dec 24, 2013 4:50 pm

Hi,
Many thanks for your helpful answer. I now have this code :

VERSION BUILD=6060703 RECORDER=CR
SET !EXTRACT_TEST_POPUP NO
SET !EXTRACT NULL
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds1 EXTRACT=TXT
SET !VAR1 !EXTRACT
SET !EXTRACT NULL
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:oddsX EXTRACT=TXT
SET !VAR2 !EXTRACT
SET !EXTRACT NULL
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds2 EXTRACT=TXT
SET !VAR3 !EXTRACT
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds1 CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:oddsX CONTENT={{!VAR2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editEventOddsForm ATTR=NAME:odds2 CONTENT={{!VAR3}}

The first 3 Extract steps seems to work, but the last 3 lines are only writing the string "!EXTRACT".What could be the issue here? Am I assigning the variables incorrectly?
cietru
Posts: 2
Joined: Tue Dec 17, 2013 5:37 pm

Re: !EXTRACT

Post by cietru » Tue Dec 24, 2013 5:08 pm

Issue Resolved... Missing "{{..}} around !EXTRACT....
Thanks again for the help
chivracq
Posts: 9384
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: !EXTRACT

Post by chivracq » Wed Dec 25, 2013 1:56 am

cietru wrote:Issue Resolved... Missing "{{..}} around !EXTRACT....
Thanks again for the help
Yes indeed, my mistake..., I typed everything from the top of my head, I guess I was not completely sober...!

(Always when in doubt, use "PROMPT {{!VARxx}}" as a powerful debugging tool...)
- (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