Jump to content

Recommended Posts

Posted

hey im currently attempting to make a script that:

just clicks on one area of the screen (on the internet), clicks on a second point on the screen and then just repeatedly keeps switching on clicking on the two points on the screens (i have to find out the coordinates on the screen first.

well i think this is an easy script to make, but some suggestions would be greatly appreciated

ok, thanks a lot

Posted

yea i already used the spy window

i have some knowledge in vb but im not too sure how to start my coding off.

this is what i have so far:

MouseClick ( "left" [, 38, 71 [, 1 [, 20 ]]] )

MouseClick ( "left" [, 343, 509 [, 1 [, 20 ]]] )

when i saved it as a .au3 file but when i run it, there is an error.

i am pretty sure that my coding is good for the actual mouse clicking but is there some coding that i should add?

thank you very much

Posted (edited)

remove the brackets:

MouseClick ( "left" , 38, 71 , 1 , 20  )
MouseClick ( "left" , 343, 509 , 1 , 20  )

Brackets mean optional

[optional]

bob(x,y[,z])=

bob(x,y)

or

bob(x,y,z)

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Posted (edited)

thanks a lot script kitty

it works fine

i was wondering, how would i add to my script some kind of hotkey

so that when i enter a key on my keyboard the script completely closes?

thanks a lot

Edited by c0mplex
Posted (edited)

; Zero evaluates to FALSE and Non-zero evaluates to TRUE

; Code should run until you press Escape

HotKeySet("{Esc}", "Terminate")
While 1
   MouseClick ( "left" , 38, 71 , 1 , 20  )
   MouseClick ( "left" , 343, 509 , 1 , 20  )
   Sleep(100);prevent maxing-out CPU
WEnd

Func Terminate()
   Exit
EndFunc

EDIT: Too slow again :D

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

HotKeySet("{Esc}", "Terminate")
hotkeyset("{pause}","start")
$x=1
while $x=1
sleep(10)
wend

While 1
  MouseClick ( "left" , 38, 71 , 1 , 20  )
  MouseClick ( "left" , 343, 509 , 1 , 20  )
  Sleep(100);prevent maxing-out CPU
WEnd

Func Terminate()
  Exit
EndFunc

func start()
$x=0
endfunc

AutoIt3, the MACGYVER Pocket Knife for computers.

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
×
×
  • Create New...