Jump to content
Sign in to follow this  
hefty

Better Way To Do This?

Recommended Posts

hefty

I have alot of mouse clicks too leave the town in my game. Perhaps there is a shorter way then adding them one by one?

WinActivate( "Guild Wars" )
MouseWheel ( "down" )
sleep(1000) 
MouseWheel ( "down" )
sleep(1000) 
MouseWheel ( "down" )
sleep(1000) 
MouseWheel ( "down" )
sleep(1000) 
MouseWheel ( "down" )
sleep(1000) 
MouseClick ( "left", 388, 489, 1, 80 )
sleep(1000) 
MouseClick ( "left", 388, 489, 1, 80 )
sleep(1000) 
MouseClick ( "left", 388, 489, 1, 80 )
sleep(1000) 
MouseClick ( "left", 388, 489, 1, 80 )
sleep(1000) 
MouseClick ( "left", 388, 489, 1, 80 )
sleep(1000) 
MouseClick ( "left", 388, 489, 1, 80 )
sleep(1000) 
MouseClick ( "left", 388, 489, 1, 80 )
sleep(1000) 
MouseClick ( "left", 388, 489, 1, 80 )
sleep(9000)
MouseClick ( "left", 764, 241, 1, 2 )
sleep(3000)
MouseClick ( "left", 501, 417, 1, 2 )
sleep(3000)
MouseClick ( "left", 501, 417, 1, 2 )
sleep(3000)
MouseClick ( "left", 501, 417, 1, 2 )
sleep(3000)
MouseClick ( "left", 501, 417, 1, 2 )

Share this post


Link to post
Share on other sites
greenmachine

For loops are your friend.

WinActivate( "Guild Wars" )
For $i = 1 to 5
    MouseWheel ( "down" )
    sleep(1000)
Next
For $i = 1 to 8
    MouseClick ( "left", 388, 489, 1, 80 )
    sleep(1000)
Next
Sleep (8000); remainder
 MouseClick ( "left", 764, 241, 1, 2 )
sleep(3000)
For $i = 1 to 3
    MouseClick ( "left", 501, 417, 1, 2 )
    sleep(3000)
Next
  MouseClick ( "left", 501, 417, 1, 2 ); this one didn't have a sleep after it, so it's outside.

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  

×