help with else line

Advanced Macro Recorder/Editor.

Moderator: Pulover

dvir

help with else line

02 May 2017, 06:11

Hi everyone,
Im trying to write simple login macro that will run in the background infinity until i open specific login page (like to the forum's login page),
somehow i made a big mess with the code and i need your help.

this is the code :

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



The macro should search for 2 diffrent login buttons and if he dont find them he should not run and back to the if statement but he does not do that .
thanks for the help ,
dvir.
User avatar
Almost_there
Posts: 404
Joined: 30 Sep 2014, 10:32

Re: help with else line

02 May 2017, 15:08

It's hard to say because it's a mess. There is an If, but no belonging Else - or are the If/Else ment to be grouped, so there is one curly bracket too much?

Also, the label "1" doesn't give any sense, espechially not when it's only statement within the If statement.

Another problem (i think that is a problem) is that there is a function call between ImageSearch and "If errorlevel" - so that may mess up with the errorlevel check. I've not tested yet if errorlevel is global or not, I think it was never ment to be used globally.

I can assume that CenterImgSrchCoords() should be a part of the "if errorlevel" block together with Click command.

Return to “Pulovers Macro Creator”

Who is online

Users browsing this forum: No registered users and 1 guest