Make an IF statement with EVAL command

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
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
elkhalil
Posts: 4
Joined: Sun Oct 20, 2019 2:44 pm

Make an IF statement with EVAL command

Post by elkhalil » Sun Oct 20, 2019 7:59 pm

Hello Everyone :D

I'm using

Code: Select all

iMacros v9.0.3 on Firefox 53.0.3 (64 bit) in Windows 10 x64
I'm trying to create a script that I will use it in LOOP mode, extracting pictures from a website. Until here everything is great.

I just want to setup an If statement;

IF the value of !VAR1 is a multiple of one hundred, which means (VAR1=100) or (VAR1=200) or (VAR1=300) ... or (VAR1=6600)

THEN run this command

Code: Select all

ADD !VAR4 1
ELSE ignore and continue


I think it's possible to do it with EVAL command :mrgreen: , I tried several hours but no result. :(

Thank you
chivracq
Posts: 8720
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Make an IF statement with EVAL command

Post by chivracq » Tue Oct 22, 2019 1:06 am

elkhalil wrote:
Sun Oct 20, 2019 7:59 pm
Hello Everyone :D

I'm using

Code: Select all

iMacros v9.0.3 on Firefox 53.0.3 (64 bit) in Windows 10 x64
I'm trying to create a script that I will use it in LOOP mode, extracting pictures from a website. Until here everything is great.

I just want to setup an If statement;

IF the value of !VAR1 is a multiple of one hundred, which means (VAR1=100) or (VAR1=200) or (VAR1=300) ... or (VAR1=6600)

THEN run this command

Code: Select all

ADD !VAR4 1
ELSE ignore and continue


I think it's possible to do it with EVAL command :mrgreen: , I tried several hours but no result. :(

Thank you

+ Parallel Thread on SOF:
- Make an IF statement with EVAL command
(A few Comments, one mentions more or less the/a Solution, and FCI is mentioned, I'm "impressed"...! :D )
- (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...
elkhalil
Posts: 4
Joined: Sun Oct 20, 2019 2:44 pm

Re: Make an IF statement with EVAL command

Post by elkhalil » Tue Oct 22, 2019 10:47 am

chivracq wrote:
Tue Oct 22, 2019 1:06 am
elkhalil wrote:
Sun Oct 20, 2019 7:59 pm
Hello Everyone :D

I'm using

Code: Select all

iMacros v9.0.3 on Firefox 53.0.3 (64 bit) in Windows 10 x64
I'm trying to create a script that I will use it in LOOP mode, extracting pictures from a website. Until here everything is great.

I just want to setup an If statement;

IF the value of !VAR1 is a multiple of one hundred, which means (VAR1=100) or (VAR1=200) or (VAR1=300) ... or (VAR1=6600)

THEN run this command

Code: Select all

ADD !VAR4 1
ELSE ignore and continue


I think it's possible to do it with EVAL command :mrgreen: , I tried several hours but no result. :(

Thank you

+ Parallel Thread on SOF:
- Make an IF statement with EVAL command
(A few Comments, one mentions more or less the/a Solution, and FCI is mentioned, I'm "impressed"...! :D )
So where is the probleme? I'm the one who published that similar thread in SOF, is that not allowed??
chivracq
Posts: 8720
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Make an IF statement with EVAL command

Post by chivracq » Tue Oct 22, 2019 2:14 pm

elkhalil wrote:
Tue Oct 22, 2019 10:47 am
So where is the probleme? I'm the one who published that similar thread in SOF, is that not allowed??

No "Problem" at all, I only mention parallel Threads on other Tech Forums for "other" Users that might be interested, in case those parallel Threads might receive some other Solution than on our Forum... 8)

Perfectly fine for me to open parallel Threads on different Tech Forums, but I then expect the User to "maintain" them all and to provide the same "Quality" in all Instances, like mentioning their FCI, + neat Follow-up and sharing the/their Solution/final Script also on the "other" Forum(s)...
It maybe gives the User more "Chances" to get some Replies/Answer(s), but it's also "more Work" to update all Instances... :|

(I'm "also" the main/most active Answerer for iMacros Threads/Qt's on SOF, even if I prefer to answer on our Forum as I don't really "like" SOF where "everything" there only revolves around Reputation Points, the Site is annoyingly Buggy, and the Quality about iMacros Qt's is usually pretty low, and the Site is rather meant for "easy" Qt => "easy"/direct Answer, while iMacros Qt's usually require several Steps in Communication with "try this, or try that" then later depending on the first Results, "try this or try that" until you get a final working Script.
And most 1st time Posters on SOF very often delete their Thread once they have their Solution and their Script working, (especially about Games), which makes it "a bit useless" for Advanced Users like me as answering such Threads is a bit of a waste of time for me knowing the User will probably later delete their Qt..., and usually don't follow up and don't "accept" Answers...)
- (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