Jump to content

Will this work?


Go to solution Solved by Jos,

Recommended Posts

Func Bank()
   While $Keypress = True
Send ( "LEFT")
sleep(0)
wend
$bank (PixelSearch(148, 154, 667, 492, $bankcolor)
if isarray($bank) then
   $Keypress = False
   Mouseclick("left", $point[0], $point[1])
   Sleep(5000)
else
   Bank()
   endif
EndFunc

So the idea of this is it will press the Left key until $bank finds the $bankcolor within the co-ordinates and when it finds the color it will stop pressing left and click on the area with the color, will this work? Sorry if big mistakes I only just started  :P

Link to comment
Share on other sites

You have to have an idea and then turn it into a list of actions and then start coding those actions one by one into autoit and test the results as you go. I can see where this could work if the code you didn't provide was made correctly. I can also see where this wouldn't work. Try it. If it doesn't work then debug it.

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Link to comment
Share on other sites

  • Developers
  • Solution

I mean are there any obvious errors you can see, I'm a rookie and I don't know what's what

Several... but since you only posted a single func without any explanation there isn't much you can expect.

Syntax error will nicely be reported to you by au3check. just install the separate SciTE4AutoIt3 installer to have that ran automatically for you when pressing F5 - Run.

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

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