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++.

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.

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

by xdaeros on Sat Sep 23, 2017 9:48 pm

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}
xdaeros
 
Posts: 1
Joined: Sat Sep 23, 2017 9:36 pm

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

by chivracq on Mon Sep 25, 2017 7:12 pm

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)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: 6481
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by thecoder2012 on Mon Nov 20, 2017 6:35 am

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:
viewtopic.php?f=11&t=28083
viewtopic.php?f=11&t=28139
viewtopic.php?f=2&t=27921
viewtopic.php?f=11&t=27952
viewtopic.php?f=2&t=27961
viewtopic.php?f=11&t=28001
viewtopic.php?f=11&t=28139
viewtopic.php?f=11&t=14010
viewtopic.php?f=2&t=22219 (Workarounds for Conditional Logic in Macro Code)

And we have already one good topic for freebitco: 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!
User avatar
thecoder2012
 
Posts: 109
Joined: Sat Aug 15, 2015 10:14 am
Location: Internet


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 3 guests

-->