Jayce Posted September 25, 2009 Posted September 25, 2009 Hey Guys, Im EXTREMELY New To This Scripting Stuff.When I Try To Run The Sxript Below, I Am Receiving This Error.HotKeySet("Mouseclick("left")", "ToggleSpam")HotKeySet("+{ESC}", "EndSpam")Global $xMsgBox(0, "MouseSpaz", "MouseClick("middle") Starts the spaz (press both keys with your left thumb)" & @LF & @LF & "Pressing Alt+X again will stop the spaz" & @LF & @LF & "Shift+Esc will quite the program")While 1 While $x MouseClick("primary") WEndWEnd;FUNCTIONSFunc ToggleSpam() $x = Not $xEndFunc ;==>ToggleSpamFunc EndSpam() ExitEndFunc ;==>EndSpamAny Help Would be Appreciated, Thanks
jvanegmond Posted September 25, 2009 Posted September 25, 2009 Hi, name of function should indicate your problem.It's HotKeySet. Not HotMouseSet (there is no HotMouseSet, don't bother looking). github.com/jvanegmond
Jayce Posted September 25, 2009 Author Posted September 25, 2009 Hi, name of function should indicate your problem.It's HotKeySet. Not HotMouseSet (there is no HotMouseSet, don't bother looking).ohk, thanks. i wonder. is there any chance i could make it so that whilst i hold down my left mouse button or even my middle mouse button if possible that this script could run.basically im trying to create a script that allows me to make very rapid mouse clicks, but prefferentially i would like the activation to occur when i click my mouse.- thanks
jvanegmond Posted September 25, 2009 Posted September 25, 2009 No, that's not possible. It's been asked many times, and it's also been exampled many times. github.com/jvanegmond
AdmiralAlkex Posted September 25, 2009 Posted September 25, 2009 You could do something when the mouse is held down, but I don't think that would be very effective.#Include <Misc.au3> $DLL = DllOpen("user32.dll") While 1 Sleep(10) While _IsPressed(05, $DLL) Sleep(10) MouseClick("right") WEnd WEndSome things to know:This eats quite alot of CPU, increase the Sleep() if necessary/possible.Use _IsPressed with a mousebutton that doesn't do anything in the game/application you intend to run or things will get messy. 05 is button 4 and 06 button 5. See _IsPressed() in the helpfile."right" means the right button (you couldn't guess that could you? ). Look at MouseClick() in the helpfile for a nice table describing the choices for it. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
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