Dequality

Need help ImageSearch.

16 posts in this topic

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.

nhelp.PNG

Share this post


Link to post
Share on other sites



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.. :(

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

One would think that the error message is quite descriptive. :) 
Do needs an Until in stead of a Next
 

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
9 minutes ago, Jos said:

One would think that the error message is quite descriptive. :) 
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.

Share this post


Link to post
Share on other sites

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 


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 by AutoBert

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

*EDIT*

On to the next step*

 

Share this post


Link to post
Share on other sites
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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

@Jos 

 

Well maybe ur right, i didnt know what else u wanted me to explain that what i did honestly^^ 

 

Dequality.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#15 ·  Posted (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:

  1. I don't know what you need
  2. 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 by AutoBert

Share this post


Link to post
Share on other sites

@AutoBert

Ouch, sorry ^^ forgot about that ;)

Well it kinda works now ;) so thx.

 

Dequality

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now