how to use If And Else... Plz Help... Ez For U :D

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
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
xdaeros
Posts: 1
Joined: Sun Sep 24, 2017 4:36 am

how to use If And Else... Plz Help... Ez For U :D

Post by xdaeros » Sun Sep 24, 2017 4:48 am

Hello I'm New In This Imacro Version I Use Version 8.9.7 In Firefox v46.0 The Thing Is That I Have A Macro And It Works Perfectly ... But Sometimes It Takes Error Solving The Catcha And As Here There Is No If And Else I Want It in the penulultimo step reload the page and check if the button is ... if the button is executed again the script and if there is the button that follows the next step. I program in C ++ .. I can give an example of what I say ...

first script
refresh Page
if (Button = 1) {goto first script};
else (Button = 0) {wait X Seconds};


I leave the script to which I want to add the if and else

button = free_play_form_button

first script
SET! EXTRACT_TEST_POPUP NO
SET! ERRORIGNORE YES
SET! TIMEOUT_PAGE 60
TAB T = 1
TAB CLOSEALLOTHERS
SET API --------------------------
URL GOTO = https: //freebitco.in/? Op = home
FILEDELETE NAME = C: \ Images \ freebitco1.jpg
ONDOWNLOAD FOLDER = C: \ images FILE = freebitco1.jpg
WAIT SECONDS = 10
TAG POS = 1 TYPE = DIV ATTR = CLASS: captchasnet_captcha_content CONTENT = EVENT: SAVE_ELEMENT_SCREENSHOT
WAIT SECONDS = 10
TAB OPEN
TAB T = 2
GOTO URL = http: //www.9kw.eu/grafik/form.html
TAG POS = 1 TYPE = INPUT ATTR = NAME: apikey CONTENT = {{API}}
TAG POS = 1 TYPE = INPUT ATTR = NAME: prio CONTENT = 5
TAG POS = 1 TYPE = INPUT: CHECKBOX FORM = ACTION: /index.cgi ATTR = NAME: selfsolve CONTENT = NO
TAG POS = 1 TYPE = INPUT: CHECKBOX FORM = ACTION: /index.cgi ATTR = NAME: confirm CONTENT = NO
TAG POS = 1 TYPE = INPUT: CHECKBOX FORM = ACTION: /index.cgi ATTR = NAME: case-sensitive CONTENT = YES
TAG POS = 1 TYPE = INPUT ATTR = NAME: source CONTENT = imacros
TAG POS = 1 TYPE = INPUT ATTR = NAME: file-upload-01 CONTENT = C: \ Images \ freebitco1.jpg
SET! TIMEOUT_STEP 3600
TAG POS = 1 TYPE = INPUT ATTR = TYPE: submit
SET! EXTRACT NULL
TAG POS = 1 TYPE = INPUT ATTR = NAME: result EXTRACT = TXT
SET! TIMEOUT_STEP 0
WAIT SECONDS = 1
TAB CLOSE
TAB T = 1
TAG POS = 1 TYPE = INPUT: TEXT ATTR = * CONTENT = {{! EXTRACT}}
WAIT SECONDS = 1
TAG POS = 1 TYPE = INPUT: SUBMIT ATTR = ID: free_play_form_button
---------------------------------------------
if (Button = 1) {goto first script}
else (Button = 0) {WAIT SECONDS = 3610}
chivracq
Posts: 8765
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: how to use If And Else... Plz Help... Ez For U :D

Post by chivracq » Tue Sep 26, 2017 2:12 am

xdaeros wrote:Hello I'm New In This Imacro Version I Use

Code: Select all

Version 8.9.7 In Firefox v46.0
The Thing Is That I Have A Macro And It Works Perfectly ... But Sometimes It Takes Error Solving The Catcha And As Here There Is No If And Else I Want It in the penulultimo step reload the page and check if the button is ... if the button is executed again the script and if there is the button that follows the next step. I program in C ++ .. I can give an example of what I say ...

first script

Code: Select all

refresh Page
if (Button = 1) {goto first script};
else (Button = 0) {wait X Seconds};
I leave the script to which I want to add the if and else

button = free_play_form_button

first script

Code: Select all

SET! EXTRACT_TEST_POPUP NO
SET! ERRORIGNORE YES
SET! TIMEOUT_PAGE 60
TAB T = 1
TAB CLOSEALLOTHERS
SET API --------------------------
URL GOTO = https: //freebitco.in/? Op = home
FILEDELETE NAME = C: \ Images \ freebitco1.jpg
ONDOWNLOAD FOLDER = C: \ images FILE = freebitco1.jpg
WAIT SECONDS = 10
TAG POS = 1 TYPE = DIV ATTR = CLASS: captchasnet_captcha_content CONTENT = EVENT: SAVE_ELEMENT_SCREENSHOT
WAIT SECONDS = 10
TAB OPEN
TAB T = 2
GOTO URL = http: //www.9kw.eu/grafik/form.html
TAG POS = 1 TYPE = INPUT ATTR = NAME: apikey CONTENT = {{API}}
TAG POS = 1 TYPE = INPUT ATTR = NAME: prio CONTENT = 5
TAG POS = 1 TYPE = INPUT: CHECKBOX FORM = ACTION: /index.cgi ATTR = NAME: selfsolve CONTENT = NO
TAG POS = 1 TYPE = INPUT: CHECKBOX FORM = ACTION: /index.cgi ATTR = NAME: confirm CONTENT = NO
TAG POS = 1 TYPE = INPUT: CHECKBOX FORM = ACTION: /index.cgi ATTR = NAME: case-sensitive CONTENT = YES
TAG POS = 1 TYPE = INPUT ATTR = NAME: source CONTENT = imacros
TAG POS = 1 TYPE = INPUT ATTR = NAME: file-upload-01 CONTENT = C: \ Images \ freebitco1.jpg
SET! TIMEOUT_STEP 3600
TAG POS = 1 TYPE = INPUT ATTR = TYPE: submit
SET! EXTRACT NULL
TAG POS = 1 TYPE = INPUT ATTR = NAME: result EXTRACT = TXT
SET! TIMEOUT_STEP 0
WAIT SECONDS = 1
TAB CLOSE
TAB T = 1
TAG POS = 1 TYPE = INPUT: TEXT ATTR = * CONTENT = {{! EXTRACT}}
WAIT SECONDS = 1
TAG POS = 1 TYPE = INPUT: SUBMIT ATTR = ID: [b]free_play_form_button[/b]
---------------------------------------------
if (Button = 1) {goto first script}
else (Button = 0) {WAIT SECONDS = 3610}
Oh...!, Thread Content is not so bad actually, with even FCI mentioned, very good (hum, OS missing though...), and you've put some nice Effort in your Post, but sorry, remove the "Drama" and SMS Language in your Thread Title for me to read... and maybe answer... :idea:

Sorry but I don't read/answer Threads with a "useless" (= non-descriptive or with "Drama") Title, ah-ah...! :roll:
=> The "Plz Help... Ez For U :D" part is completely useless and doesn't add any Info about the Content... :roll: and can therefore be removed, and even "how to use If And Else..." is not very-very Descriptive of the "Specificity" of your Thread, I would think..., many-many-many Threads on the Forum are about 'IF + ELSE', and hum, you are not sharing a 'HowTo' but asking a Qt or for Help... :?

(OK, I'll read the Content (only) once your Thread Title is a bit correct... (You've already lost 1.5 days from not doing "Things" correctly directly... and I'm being "nice" to react anyway but "Drama" doesn't really work on a Technical Forum...) :idea: )

Hum, and try to select the correct Sub-Forum next time you open a Thread, (=> 'General' Sub-Forum in this case), your Thread has nothing to do with the 'Scripting Interface'... (But OK, no need to duplicate now...)
- (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...
User avatar
thecoder2012
Posts: 366
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: how to use If And Else... Plz Help... Ez For U :D

Post by thecoder2012 » Mon Nov 20, 2017 1:35 pm

xdaeros wrote:Hello I'm New In This Imacro Version I Use Version 8.9.7 In Firefox v46.0 The Thing Is That I Have A Macro And It Works Perfectly ... But Sometimes It Takes Error Solving The Catcha And As Here There Is No If And Else I Want It in the penulultimo step reload the page and check if the button is ... if the button is executed again the script and if there is the button that follows the next step.
Please use javascript with if/else for your imacros thing.
Few topics with if/else:
http://forum.imacros.net/viewtopic.php?f=11&t=28083
http://forum.imacros.net/viewtopic.php?f=11&t=28139
http://forum.imacros.net/viewtopic.php?f=2&t=27921
http://forum.imacros.net/viewtopic.php?f=11&t=27952
http://forum.imacros.net/viewtopic.php?f=2&t=27961
http://forum.imacros.net/viewtopic.php?f=11&t=28001
http://forum.imacros.net/viewtopic.php?f=11&t=28139
http://forum.imacros.net/viewtopic.php?f=11&t=14010
http://forum.imacros.net/viewtopic.php?f=2&t=22219 (Workarounds for Conditional Logic in Macro Code)

And we have already one good topic for freebitco: http://forum.imacros.net/viewtopic.php?f=11&t=27809
See http://wiki.imacros.net/JavaScript or http://wiki.imacros.net/Web_Scripting#C ... _Interface
chivracq wrote:Oh...!, Thread Content is not so bad actually, with even FCI mentioned, very good (hum, OS missing though...), and you've put some nice Effort in your Post, but sorry, remove the "Drama" and SMS Language in your Thread Title for me to read... and maybe answer... :idea:
Funny.
chivracq wrote:many-many-many Threads on the Forum are about 'IF + ELSE', and hum, you are not sharing a 'HowTo' but asking a Qt or for Help... :?
Sure, sure. But which thread is really useful? Topic with "Workarounds for Conditional Logic in Macro Code"? I think one link is very helpful because forum search is not really good with your searchword "IF + ELSE" :wink:
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
Post Reply