How to use Conditional EVAL going to certain urls

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Re: How to use Conditional EVAL going to certain urls

by a2515125 on Sat Jul 15, 2017 12:14 pm

Code: Select all
VERSION BUILD=8970419 RECORDER=FX
SET !REPLAYSPEED FAST
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
SET !DATASOURCE C:\Users\a2515125\Desktop\iMacroscript\URLS.csv

TAB T=1

SET reload EVAL("var x; y='{{!LOOP}}'; url='{{!COL1}}'; if(y%10==0){x=url;} else{x='';}; x;")

URL GOTO={{reload}}

chivracq wrote:Yep, normal, '!COL1' uses '!LOOP' to know from Row it needs to fetch the Data in Col_1... You then need to compute '!DATASOURCE_LINE' based on '!LOOP', by simply dividing '!LOOP' by 10, I would think...


do you mean I have to divide data in every next 10 Column?
if I have 100 data, it means I have to put 100 blank column between data
100 data need to make nearly 100*100(blank cols)-100(data cols) blank
that would be a long long long COLUMN ....... :oops: :oops:

is there any magic syntax can make it possible to fetch from COL 1.2.3.4.5 .....in Eval syntax in pure iim....???
I mean i want to let {x=url} LOOPS by itself FROM COL 1/2/3......not influenced by y='{{ !LOOP}}'

I wish I were smarter and more creative :idea:
a2515125
 
Posts: 84
Joined: Mon Dec 05, 2016 8:37 pm

Re: How to use Conditional EVAL going to certain urls

by chivracq on Mon Jul 17, 2017 1:25 pm

a2515125 wrote:
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
SET !REPLAYSPEED FAST
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
SET !DATASOURCE C:\Users\a2515125\Desktop\iMacroscript\URLS.csv

TAB T=1

SET reload EVAL("var x; y='{{!LOOP}}'; url='{{!COL1}}'; if(y%10==0){x=url;} else{x='';}; x;")

URL GOTO={{reload}}

chivracq wrote:Yep, normal, '!COL1' uses '!LOOP' to know from Row it needs to fetch the Data in Col_1... You then need to compute '!DATASOURCE_LINE' based on '!LOOP', by simply dividing '!LOOP' by 10, I would think...


do you mean I have to divide data in every next 10 Column?
if I have 100 data, it means I have to put 100 blank column between data
100 data need to make nearly 100*100(blank cols)-100(data cols) blank
that would be a long long long COLUMN ....... :oops: :oops:

is there any magic syntax can make it possible to fetch from COL 1.2.3.4.5 .....in Eval syntax in pure iim....???
I mean i want to let {x=url} LOOPS by itself FROM COL 1/2/3......not influenced by y='{{ !LOOP}}'

I wish I were smarter and more creative :idea:

Well, that's indeed a Solution, but not very practical indeed, ah-ah...!

No, what I mean is that you divide '!LOOP' by 10 to use for '!DATASOURCE_LINE' every 10 Loops, it's a simple Maths Operation...:
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
TAB T=1

SET !LOOP 1
SET !DATASOURCE C:\Users\a2515125\Desktop\iMacroscript\URLS.csv
SET Reload_DataSource_Line EVAL("var x; y='{{!LOOP}}'; if(y%10==0){x=y/10;} else{x=1;}; x;")
SET !DATASOURCE_LINE {{Reload_DataSource_Line}}

SET reload EVAL("var x; y='{{!LOOP}}'; url='{{!COL1}}'; if(y%10==0){x=url;} else{x='';}; x;")
URL GOTO={{reload}}
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6490
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: How to use Conditional EVAL going to certain urls

by a2515125 on Tue Jul 18, 2017 1:40 am

SET Reload_DataSource_Line EVAL("var x; y='{{!LOOP}}'; if(y%10==0){x=y/10;} else{x=1;}; x;")

oh I never thought of using eval on SET

to be shamed, I never like math til I learn imacros :lol: and often get score no higher than 50 since elementary school :oops:

your way is simplest as always..thanks
a2515125
 
Posts: 84
Joined: Mon Dec 05, 2016 8:37 pm

Previous

Return to General Support & Discussions

Who is online

Users browsing this forum: Google [Bot] and 10 guests

cron
-->