Jump to content
Sign in to follow this  
Jambaman

Will this work?

Recommended Posts

Jambaman

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

Share this post


Link to post
Share on other sites
Jambaman

Press F5 to see.

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

Edited by Jambaman

Share this post


Link to post
Share on other sites
computergroove

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

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
Sign in to follow this  

×