Sign in to follow this  
Followers 0
Husa

Autoclicking script - Looking for some help.

6 posts in this topic

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



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

#3 ·  Posted (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 by Husa

Share this post


Link to post
Share on other sites

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

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


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

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

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  
Followers 0