omiden Posted June 8, 2010 Share Posted June 8, 2010 Can someone tell me why this code doesn't work? When I hit "-" that is suppose to turn that code on. When I hit "=" its suppose to be off and not do anything. #include <Misc.au3> $dll = DllOpen("user32.dll") $ExitKey = '75'; ESC HotKeySet ( "BD" , "On" ) HotKeySet ( "BB" , "Off" ) Func On() While 1 Sleep(10) If _IsPressed("01", $dll) Then MouseMove(640, 518, 100) If _IsPressed($ExitKey, $dll) Then ExitLoop WEnd DllClose($dll) EndFunc Func Off() While 1 Sleep(10) If _IsPressed("01", $dll) Then MouseMove(0, 0, 0) If _IsPressed($ExitKey, $dll) Then ExitLoop WEnd DllClose($dll) EndFunc Link to comment Share on other sites More sharing options...
bogQ Posted June 8, 2010 Share Posted June 8, 2010 (edited) HotKeySet is working, Read 0ne more time in help file what goes as first parametar "key" for command HotKeySet() Dont know why you asumed that its using the same parametar as _IsPressed func Edited June 8, 2010 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
omiden Posted June 8, 2010 Author Share Posted June 8, 2010 (edited) HotKeySet is working,Read 0ne more time in help file what goes as first parametar "key" for command HotKeySet()Dont know why you asumed that its using the same parametar as _IsPressed funcWow pretty stupid of me to do that, thanks Edited June 8, 2010 by omiden 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