inloveofrapo Posted June 14, 2008 Share Posted June 14, 2008 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 More sharing options...
Paulie Posted June 14, 2008 Share Posted June 14, 2008 (edited) 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 Edited June 14, 2008 by Paulie Link to comment Share on other sites More sharing options...
Kiti Posted June 14, 2008 Share Posted June 14, 2008 (edited) 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 June 14, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Paulie Posted June 14, 2008 Share Posted June 14, 2008 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 More sharing options...
inloveofrapo Posted June 14, 2008 Author Share Posted June 14, 2008 thx, working except the "^" shud me " + " Link to comment Share on other sites More sharing options...
Paulie Posted June 14, 2008 Share Posted June 14, 2008 thx, working except the "^" shud me " + " "+" would be Shift.You said "ctrl+alt+s" not "shift+alt+s" Link to comment Share on other sites More sharing options...
inloveofrapo Posted June 14, 2008 Author Share Posted June 14, 2008 oh, yeah, my bad, meant shift + alt Link to comment Share on other sites More sharing options...
martin Posted June 14, 2008 Share Posted June 14, 2008 (edited) 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 June 14, 2008 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 More sharing options...
Paulie Posted June 14, 2008 Share Posted June 14, 2008 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;==>StopYou make good points. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now