Husa 0 Posted May 25, 2010 Well, im looking for some help to make a script : I press ctrl + shift + A, then the script starts. When script is started, it should be clicking on left mouseclick every ~0.5 seconds. I Press ctrl + shift + S, Then the script stops. I allready tried to make one, but didnt got it working. I've read the "MouseClick" help functions, but nothing yet, cant find what I need. This is what I tried so far: HotKeySet("!+a", "MouseClick") While 1 Sleep(100) WEnd mouseclick("left" [, [, 9999999999 [, ]]] I know there isnt a stop function on this, was just trying if i could get it working. But coudnt, The script didnt even click a single time, even tho i've set it to 999999999.. Looking forward to get some FAST help, Thanks. Share this post Link to post Share on other sites
Affe 1 Posted May 25, 2010 The error is in how you are writing the functions and the name you gave it. Also, you need to define where to click the mouse (x/y coordinates). HotKeySet("!+a", "MouseClicker") HotKeySet("!+s", "Terminate") While 1 Sleep(100) WEnd Func MouseClicker() $x = ;(put your x coord here) $y = ;(put your y coord here) While 1 MouseClick("left", $x, $y, 1, 0) Sleep(500) ;sleep for half a second WEnd EndFunc Func Terminate() Exit EndFunc [center][/center] Share this post Link to post Share on other sites
Husa 0 Posted May 25, 2010 (edited) This is exactly what i was looking for. but There is no cordinates, It shud just be clicking when i start it, ill be moving the mouse. What do i edit now then? Edited May 25, 2010 by Husa Share this post Link to post Share on other sites
Affe 1 Posted May 25, 2010 This is exactly what i was looking for. but There is no cordinates, It shud just be clicking when i start it, ill be moving the mouse. What do i edit now then? In that case, you'll have to simply get the current coordinates each time you click: HotKeySet("!+a", "MouseClicker") HotKeySet("!+s", "Terminate") While 1 Sleep(100) WEnd Func MouseClicker() While 1 MouseClick("left", MouseGetPos(0), MouseGetPos(1), 1, 0) Sleep(500) ;sleep for half a second WEnd EndFunc Func Terminate() Exit EndFunc [center][/center] Share this post Link to post Share on other sites
kaotkbliss 146 Posted May 25, 2010 HotKeySet("!+a", "MouseClicker") HotKeySet("!+s", "Terminate") While 1 Sleep(100) WEnd Func MouseClicker() While 1 $pos= MouseGetPos() MouseClick("left", $pos[0], $pos[1], 1, 0) Sleep(500) ;sleep for half a second WEnd EndFunc Func Terminate() Exit EndFunc 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites
Husa 0 Posted May 25, 2010 In that case, you'll have to simply get the current coordinates each time you click: HotKeySet("!+a", "MouseClicker") HotKeySet("!+s", "Terminate") While 1 Sleep(100) WEnd Func MouseClicker() While 1 MouseClick("left", MouseGetPos(0), MouseGetPos(1), 1, 0) Sleep(500) ;sleep for half a second WEnd EndFunc Func Terminate() Exit EndFunc Thank you. I really appreciate the fast help you gave me. Share this post Link to post Share on other sites