Jump to content

Is it possible to make auto it just clicking ?


Recommended Posts

Well, i was wondering if it was possible to make this autoit clicking it self to the place where mouse is ?

For example, i press ctrl + alt + p = It press on left side mouse all the time ( Ca 1 time each 0.5 sec ), and when i press ctrl + alt + s = It stops..

Is it possible?

If yes, can anybody script this for me and post here?

Thanks.

Link to comment
Share on other sites

HotKeySet("^!P", "Press")
HotKeySet("^!S", "Stop")
Func Press()
For $i = 1 to 9999999999999999999
        MouseClick("main")
        Sleep(500)
        Next
EndFunc
    
Func Stop()
    Exit 0
EndFunc

What game you wanna trick? :)

Edited by Kiti
Link to comment
Share on other sites

Func Press()
For $i = 1 to 9999999999999999999
        MouseClick("main")
        Sleep(500)
        Next
    EndFunc
    
Func Stop()
    Exit 0
EndFunc

HotKeySet("^!P", "Press")
HotKeySet("^!S", "Stop")

What game you wanna trick? :)

Probably not the best place for a for...next loop

I would recommend using infinite loop. Avoid simulating infinity with 999999999999999999999999999

Link to comment
Share on other sites

Hotkeyset("^!p", "Start")
Hotkeyset("^!s", "Stop")

While 1
Sleep(100)
WEnd

Func Start()
While 1
Sleep(500) ;.5 secs
Mouseclick("Left")
WEnd
EndFunc

Func Stop()
While 1
Sleep(100)
WEnd
;Exit
EndFunc

EDIT: Forgot autoit Tags :)

I don't think that's a good way to do it because when you have a hotkey sequence calling a function the current function is supended, the the new function is called and when that finishes the previous function continues. After a few presses of hot key sequences who knows what functions might be queued up?

I think this would be better

HotKeySet("^!p", "Start")
HotKeySet("^!s", "Stop")
Global $KeepClicking = False
While 1
    Sleep(100)
WEnd

Func Start()
    $KeepClicking = True
    While $KeepClicking
        Sleep(500);.5 secs
        Mouseclick("Left")
    WEnd
EndFunc ;==>Start

Func Stop()
    $KeepClicking = False
EndFunc ;==>Stop
Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I don't think that's a good way to do it because when you have a hotkey sequence calling a function the current function is supended, the the new function is called and when that finishes the previous function continues. After a few presses of hot key sequences who knows what functions might be queued up?

I think this would be better

HotKeySet("^!p", "Start")
HotKeySet("^!s", "Stop")
Global $KeepClicking = False
While 1
    Sleep(100)
WEnd

Func Start()
    $KeepClicking = True
    While $KeepClicking
        Sleep(500);.5 secs
        Mouseclick("Left")
    WEnd
EndFunc;==>Start

Func Stop()
    $KeepClicking = False
EndFunc;==>Stop
You make good points.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...