Jump to content

Need help ImageSearch.


Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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

Jos

Edited 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.
  :)

Link to comment
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.

Link to comment
Share on other sites

  • Developers

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

Link to comment
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.

Link to comment
Share on other sites

  • Developers

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

Link to comment
Share on other sites

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
Link to comment
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

Link to comment
Share on other sites

  • Developers
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.
  :)

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...