Jump to content
Sign in to follow this  
Nbanonimous

Hotkey BlockInput

Recommended Posts

Nbanonimous

hey guys im working with this

#NoTrayIcon
HotKeySet("!v", "Block")

Func Block()
    BlockInput(1)
    sleep(5000)
    BlockInput(0)
EndFunc

what im tryin to do

is hit Alt + V and it blocks input for 5 seconds

then unblocks...

but when i run it

it doesnt do anything...

Share this post


Link to post
Share on other sites
Swift

You need a loop in there. It exits as soon as it sets.

Share this post


Link to post
Share on other sites
Swift

HotKeySet("{ESC}", "Bye")
HotKeySet("!v", "Block")
While 1
    Sleep(10)
WEnd
Func Block()
    BlockInput(1)
    sleep(5000)
    BlockInput(0)
EndFunc
Func Bye()
Exit
EndFunc

Share this post


Link to post
Share on other sites
Swift

It Doesn't Really Matter...

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.