Jump to content
Sign in to follow this  
inloveofrapo

Is it possible to make auto it just clicking ?

Recommended Posts

inloveofrapo

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.

Share this post


Link to post
Share on other sites
Kiti

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

Share this post


Link to post
Share on other sites
Paulie

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

Share this post


Link to post
Share on other sites
inloveofrapo

thx, working except the "^" shud me " + " :)

Share this post


Link to post
Share on other sites
Paulie

thx, working except the "^" shud me " + " :)

"+" would be Shift.

You said "ctrl+alt+s" not "shift+alt+s"

Share this post


Link to post
Share on other sites
inloveofrapo

oh, yeah, my bad, meant shift + alt :)

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
Paulie

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.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.