Shinju Posted April 16, 2009 Report Share Posted April 16, 2009 So here is my problem, I'm trying to run this very simple macro but this error occurs. I just dont get how the end if is not matching and how i can get it to work. thx in advance for any help try4.mex Quote Link to comment Share on other sites More sharing options...
stevecasper Posted April 16, 2009 Report Share Posted April 16, 2009 So here is my problem, I'm trying to run this very simple macro but this error occurs. I just dont get how the end if is not matching and how i can get it to work. thx in advance for any help The problem is that your If statement is inside the Repeat loop and its matching End If is outside the repeat. You'll want to bring the Else and End If inside the loop... it will look more like this: Repeat Start (Repeat 255 times) Text Type: %D1% Mouse Move Screen 865, 744 Mouse Left Button Click Mouse Move Screen 794, 682 Mouse Left Button Click If Online Mouse Move Screen 180, 28 Mouse Left Button Double Click Delay 3 Seconds Mouse Move Screen 842, 187 Mouse Left Button Click Mouse Move Screen 844, 211 Mouse Left Button Click Mouse Move Screen 1188, 723 Mouse Left Button Click Else Variable Modify Decimal: %D1% = %D1% + 1 Break End If Repeat End Notice the Break command. That is how you get out of the Repeat loop when dealing with If/Else situations. Hope this helps! Quote Link to comment Share on other sites More sharing options...
Shinju Posted April 16, 2009 Author Report Share Posted April 16, 2009 Notice the Break command. That is how you get out of the Repeat loop when dealing with If/Else situations. Hope this helps! Thx for your help. My last question is: How can I stop the macro with a key combination? edit:Found it. Quote Link to comment Share on other sites More sharing options...
randallf Posted April 16, 2009 Report Share Posted April 16, 2009 Thx for your help.My last question is: How can I stop the macro with a key combination? By default this is 'scroll lock' + 'pause|break' but you can change this at options > preferences > playback. I changed mine to just pause|break because I hate having my scroll lock state toggled all the time. Quote Link to comment Share on other sites More sharing options...
Shinju Posted April 23, 2009 Author Report Share Posted April 23, 2009 Hello again I have another question, is there a way to program something like; <if ping under 100ms> <break> i know there is a <if ping successful> command line in the scripting editor but that doesn't work for me because if the network isn't even reachable the ping is counted as successful cous no package is lost. Thx in advance Quote Link to comment Share on other sites More sharing options...
stevecasper Posted April 23, 2009 Report Share Posted April 23, 2009 Hello againI have another question, is there a way to program something like; <if ping under 100ms> <break> i know there is a <if ping successful> command line in the scripting editor but that doesn't work for me because if the network isn't even reachable the ping is counted as successful cous no package is lost. Thx in advance The If Ping Successful command has a "Maximum Time to Wait" setting. It can't be set to less than 1 second, but that is one option. Quote Link to comment Share on other sites More sharing options...
Shinju Posted April 25, 2009 Author Report Share Posted April 25, 2009 The If Ping Successful command has a "Maximum Time to Wait" setting. It can't be set to less than 1 second, but that is one option. Yes i tried this but that is still to long. I worked around with pinging a site and evaluate. I just read the changelog "The Wait commands no longer accept a maximum wait time of 0:00. The user must enter at least a one second wait time." Is there a way to get around this and set under 1 second? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.