Jump to content
Sign in to follow this  
omiden

HotKeySet Not Working?

Recommended Posts

omiden

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

Share this post


Link to post
Share on other sites
bogQ

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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites
omiden

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

Wow pretty stupid of me to do that, thanks

Edited by omiden

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  

×