Using IF ELSE in a macro
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
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
Using IF ELSE in a macro
Hi, this is my first post, and i have been reading past posts on this topic but still couldn't apply what I have read into my scenario.
I'm currently using Windows 10, Google Chrome ver91 (the latest release, i always kept it up to date), and iMacros extension in chrome (version 10.1.1)
This is the website im using iMacros on: Shopee Malaysia
The product i want to buy is currently out of stock, but it is accessible when the seller re-lists it and then restocks at a fixed time. At that time, the stock will be "0 piece available"
This is an example product page Controller for Switch (so you can get the picture) and i want it to be able to check the stock amount. if it is "0 piece available", i want it to GOTO the first line which reloads the page and then performs the IF ELSE statement again. basically i want the statement to be:
if (stock == 0):
refreshpage
else:
proceed with the remaining lines
is it possible to do this on iMacros extension or do i have to resort to the paid version? Thank you for all the help.
I'm currently using Windows 10, Google Chrome ver91 (the latest release, i always kept it up to date), and iMacros extension in chrome (version 10.1.1)
This is the website im using iMacros on: Shopee Malaysia
The product i want to buy is currently out of stock, but it is accessible when the seller re-lists it and then restocks at a fixed time. At that time, the stock will be "0 piece available"
This is an example product page Controller for Switch (so you can get the picture) and i want it to be able to check the stock amount. if it is "0 piece available", i want it to GOTO the first line which reloads the page and then performs the IF ELSE statement again. basically i want the statement to be:
if (stock == 0):
refreshpage
else:
proceed with the remaining lines
is it possible to do this on iMacros extension or do i have to resort to the paid version? Thank you for all the help.
Last edited by Tom, Tech Support on Fri Oct 01, 2021 2:38 pm, edited 1 time in total.
Reason: Removing spammy keywords from title
Reason: Removing spammy keywords from title
Re: Using IF ELSE in a macro
ssl2k wrote: ↑Tue Jun 15, 2021 2:12 pmHi, this is my first post, and i have been reading past posts on this topic but still couldn't apply what I have read into my scenario.
I'm currently using Windows 10, Google Chrome ver91 (the latest release, i always kept it up to date), and iMacros extension in chrome (version 10.1.1)
This is the website im using iMacros on: Shopee Malaysia
The product i want to buy is currently out of stock, but it is accessible when the seller re-lists it and then restocks at a fixed time. At that time, the stock will be "0 piece available"
This is an example product page Controller for Switch (so you can get the picture) and i want it to be able to check the stock amount. if it is "0 piece available", i want it to GOTO the first line which reloads the page and then performs the IF ELSE statement again. basically i want the statement to be:is it possible to do this on iMacros extension or do i have to resort to the paid version? Thank you for all the help.Code: Select all
if (stock == 0): refreshpage else: proceed with the remaining lines
=> FCI:
Code: Select all
iMacros for CR v10.1.1, 'Free', CR91, Win10.
- What script to refresh the page until the item is available
Last edited by Tom, Tech Support on Fri Oct 01, 2021 2:38 pm, edited 1 time in total.
Reason: Removing spammy keywords from title
Reason: Removing spammy keywords from title
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Using IF ELSE in a macro
If i understood it correctly, that means by using the ERRORIGNORE, i should be able to loop the script even if the buy now button is disabled right? so when the next loop comes, hopefully by then it has restocked.
tell me if im wrong
tell me if im wrong
Last edited by Tom, Tech Support on Fri Oct 01, 2021 2:39 pm, edited 1 time in total.
Reason: Removing spammy keywords from title
Reason: Removing spammy keywords from title
Re: Using IF ELSE in a macro
Yep, that's correct..., but you need to read the whole Thread and understand how the User "progressed" towards their Final Script and getting it to work...
And that other User also wanted a Mechanism to increment the Number of "Piece(s) available" to only click on the 'Buy now' Button if there were at least 2 Items available... Not sure if you want that Mechanism as well...
Last edited by Tom, Tech Support on Fri Oct 01, 2021 2:39 pm, edited 1 time in total.
Reason: Removing spammy keywords from title
Reason: Removing spammy keywords from title
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Using IF ELSE in a macro
i had no problems on incrementing the quantity. Only needed the "buy when its in stock" part of the script Thank you a lot, by the way!
Last edited by Tom, Tech Support on Fri Oct 01, 2021 2:39 pm, edited 1 time in total.
Reason: Removing spammy keywords from title
Reason: Removing spammy keywords from title
Re: Using IF ELSE in a macro
Alright, perfect then if the Script from the "other" Thread already works for you as well...
Thanks to the other User then, I would think..., they did all the "hard Work" already, ah-ah...!
Last edited by Tom, Tech Support on Fri Oct 01, 2021 2:40 pm, edited 1 time in total.
Reason: Removing spammy keywords from title
Reason: Removing spammy keywords from title
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Using IF ELSE in a macro
Posting on behalf of a "New" User:
EDIT: Oh...!, the User is Fake indeed, like I suspected, they've already tried (1 day later) to post another fake "Thanks, #MeToo" in some other Thread...
But OK, I leave this Quote as "Explanation" for the 2nd Part of my Post, and the User will be deleted during the next "Clean-up Round", no big deal...
>>>
Alright, looks like this Thread is already attracting some "Low Quality" Posts with "Thank you. #MeToo"..., but I "usually" don't approve such Low Qlt Posts as they "usually" all turn out to be "Fake", from "Fake" Users and (future) Spammers and I don't want to have to monitor those Users until they will invariably silently edit their Post (or Sig) "one day" to add some Spam...
=> For New Users who would like to post in this Thread, make sure to put "a bit more" Quality than the one in this Quote, by including your Final Script and mentioning your FCI, to add any "Value" to this Thread...
And make sure to register to the Forum from a "clean" and "real" IP. => Using a VPN or Proxy for example is a No Go, sorry...
And your IP should "match" the Country/Language of the Site... I don't "expect" a User with some Russian IP for example to speak Malaysian, ah-ah...!
Re: IF ELSE using iMacros on an e-commerce website
Post by kimwelnes » 19/06/2021 - 17:57
Post awaiting approval: [Disapprove] - [Approve]
I also have the same problems. Thanks for the solutions.
EDIT: Oh...!, the User is Fake indeed, like I suspected, they've already tried (1 day later) to post another fake "Thanks, #MeToo" in some other Thread...
But OK, I leave this Quote as "Explanation" for the 2nd Part of my Post, and the User will be deleted during the next "Clean-up Round", no big deal...
>>>
Alright, looks like this Thread is already attracting some "Low Quality" Posts with "Thank you. #MeToo"..., but I "usually" don't approve such Low Qlt Posts as they "usually" all turn out to be "Fake", from "Fake" Users and (future) Spammers and I don't want to have to monitor those Users until they will invariably silently edit their Post (or Sig) "one day" to add some Spam...
=> For New Users who would like to post in this Thread, make sure to put "a bit more" Quality than the one in this Quote, by including your Final Script and mentioning your FCI, to add any "Value" to this Thread...
And make sure to register to the Forum from a "clean" and "real" IP. => Using a VPN or Proxy for example is a No Go, sorry...
And your IP should "match" the Country/Language of the Site... I don't "expect" a User with some Russian IP for example to speak Malaysian, ah-ah...!
Last edited by Tom, Tech Support on Fri Oct 01, 2021 2:40 pm, edited 1 time in total.
Reason: Removing spammy keywords from title
Reason: Removing spammy keywords from title
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Using IF ELSE in a macro
chivracq wrote: ↑Sat Jun 19, 2021 5:01 pmAlright, looks like this Thread is already attracting some "Low Quality" Posts with "Thank you. #MeToo"..., but I "usually" don't approve such Low Qlt Posts as they "usually" all turn out to be "Fake", from "Fake" Users and (future) Spammers and I don't want to have to monitor those Users until they will invariably silently edit their Post (or Sig) "one day" to add some Spam...
=> For New Users who would like to post in this Thread, make sure to put "a bit more" Quality than the one in this Quote, by including your Final Script and mentioning your FCI, to add any "Value" to this Thread...
And make sure to register to the Forum from a "clean" and "real" IP. => Using a VPN or Proxy for example is a No Go, sorry...
And your IP should "match" the Country/Language of the Site... I don't "expect" a User with some Russian IP for example to speak Malaysian, ah-ah...!
=> Yep indeed, this Thread keeps regularly attracting "Fake" Users and Spammers, => I'm asking the Forum Admin to lock the Thread...
=> For New Users with a similar Scenario or some "Follow-up Qt", open your own Thread and you can always link to this one...
Make sure to read the Forum Rules and to put some Quality in your Thread, => by selecting the "correct" Sub-Forum (will be the 'General' or the 'Data Extraction' one), + Descriptive Thread Title and mentioning your FCI...
Last edited by Tom, Tech Support on Fri Oct 01, 2021 2:41 pm, edited 1 time in total.
Reason: Removing spammy keywords from title
Reason: Removing spammy keywords from title
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
-
- Posts: 3834
- Joined: Mon May 31, 2010 4:59 pm
Re: Using IF ELSE in a macro
I've changed the thread subject/title. If it continues to be a magnet for spammers just re-report it and I'll lock it down.
Regards,
Tom, iMacros Support
Tom, iMacros Support
Re: Using IF ELSE in a macro
Tom, Tech Support wrote: ↑Fri Oct 01, 2021 2:42 pmI've changed the thread subject/title. If it continues to be a magnet for spammers just re-report it and I'll lock it down.
Alright, that's a "Solution" indeed, let's hope 'Google Cache' won't be voiding it..., but OK, I'll let you know if some further Action is "needed"...
Thanks @Tom...
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...