Dequality Posted March 30, 2016 Posted March 30, 2016 As stated in the title, i need some help for image search , i get this error dunno how to do the "If" situation i got there... Tried "If $result = 1 Then etc etc" need to put in "If $result = 0 Then Move on" .. but it keeps giving me errors no matter what i do .,. any help are appreciatet Sorry for my bad english. -Dequality.
Dequality Posted March 30, 2016 Author Posted March 30, 2016 Well a quick edit to the thread, i meant i need it to do one thing if result = 1 if result = 0 then i should move on with the script but it doesnt seem to be willng to work with me..
Developers Jos Posted March 30, 2016 Developers Posted March 30, 2016 (edited) One would think that the error message is quite descriptive. a Do needs an Until in stead of a Next. Jos Edited March 30, 2016 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Dequality Posted March 30, 2016 Author Posted March 30, 2016 Well Jos, Until what? i dont want it to spam can i pot Until $result = 0 Or 1 , or how do i do it? kinda new to this started 2 days ago felt like i had a good hang of it but apparently not x( =D Dequality.
Dequality Posted March 30, 2016 Author Posted March 30, 2016 9 minutes ago, Jos said: One would think that the error message is quite descriptive. a Do needs an Until in stead of a Next. Jos Dunno if it's possible to edit posts, but were supposed to quote ur post >.< Dequality.
Developers Jos Posted March 30, 2016 Developers Posted March 30, 2016 Slow down please... it is pretty obvious you are answering my post so no need to quote it. The until logic is something you need to tell us as I have no idea what you are trying to accomplish. So start telling me what you want to do and when you want to stop doing the loop. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Dequality Posted March 30, 2016 Author Posted March 30, 2016 6 minutes ago, Jos said: Slow down please... it is pretty obvious you are answering my post so no need to quote it. The until logic is something you need to tell us as I have no idea what you are trying to accomplish. So start telling me what you want to do and when you want to stop doing the loop. Jos It is basically just searching for a button (well a picture of a button) then if it DOESNT fint it just need to keep moving on .. that's it but it keeps giving me need until or endif errors but as far as i see i cant figure out how to make it "Until" cuz what should it say afterwards? i mean i tried "Until $result = 0 Or 1" <- example. Dequality.
Developers Jos Posted March 30, 2016 Developers Posted March 30, 2016 Ok, let me try again: Do not quote a reply when there is no need for it! Be much more clear what you want to do because stating " if it DOESNT fint it just need to keep moving on" does not tell me anything! So, tell me in logical steps the logic for it (something like this): Enter in a loop and MouseClick left each 1.5 seconds until a button is found. When the button is found do a MouseMove and MouseClick and then Exit the Loop or Continue the loop? Exit the loop when .... Does that make sense? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
AutoBert Posted March 30, 2016 Posted March 30, 2016 (edited) 24 minutes ago, Dequality said: Until what? i dont want it to spam can i pot Until $result = 0 Or 1 Yes you can, but than you don't need to loop: just removing the Do does the same. You must know how long you want to loop: Until $Result => the codeblock (do...until) is executet at last once until first time $result = 1 (finding image 1*) Until Not $Result => the codeblock (do...until) is executet at last once until first time $result = 0 (findiing image X* [0...~] Until 1 => the codeblock (do...until) is executet endless Edited March 30, 2016 by AutoBert
Dequality Posted March 30, 2016 Author Posted March 30, 2016 @AutoBert I want it to just stop and then move on to the bedt step in the scrip, can you possibly makeup a quick example og what im requesting? Dequality @Jos Apparently someone understood My problem ;-) Well the problem is simple after it finishes the search ( a single time ) it just need to go on in the script, got it now? Dequality
Developers Jos Posted March 30, 2016 Developers Posted March 30, 2016 12 minutes ago, Dequality said: Apparently someone understood My problem ;-) The thing I was trying to do without giving you the answer, like @AutoBert did, was to let you think about your own problem and come to your own conclusions. That is much better than me guessing what you might need and you might learn something. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Dequality Posted March 30, 2016 Author Posted March 30, 2016 @Jos Well maybe ur right, i didnt know what else u wanted me to explain that what i did honestly^^ Dequality.
Dequality Posted March 30, 2016 Author Posted March 30, 2016 @Jos I know you didnt want to just throw out the answer but can u make a example with the statement im trying to get in my script? just a simple example cuz i still can't figure out what i should do .. honestly :-) Dequality.
AutoBert Posted March 30, 2016 Posted March 30, 2016 (edited) 2 hours ago, Dequality said: I want it to just stop and then move on to the bedt step in the scrip, can you possibly makeup a quick example og what im requesting? No: I don't know what you need there are better way's to automate serious applications. 99,9% ImageSearch is needed is for game automation and you know the Forumrules. So please, don't contact me further with personal message. Investing this time in reading helpfile gives a better feedback. MouseMove($x,xy,150) is nonsence 150 is a invalid value for speed (1 to 100) Edited March 30, 2016 by AutoBert
Dequality Posted March 30, 2016 Author Posted March 30, 2016 @AutoBert Ouch, sorry ^^ forgot about that Well it kinda works now so thx. Dequality
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now