Jump to content

How to make an exception to BlockInput?


Recommended Posts

Problem: I have a script running which uses send and mouseclick. In order to prevent users from messing up, I use blockinput.

But I want to allow the user to stop or interrupt the script in a controlled way, lets say by a hotkey.

An Idea anybody?

Link to comment
Share on other sites

Problem: I have a script running which uses send and mouseclick. In order to prevent users from messing up, I use blockinput.

But I want to allow the user to stop or interrupt the script in a controlled way, lets say by a hotkey.

An Idea anybody?

CTRL-ALT-DEL will re-enable user input and then they will be able to stop script using any hotkey you wish to setup.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

CTRL-ALT-DEL will re-enable user input and then they will be able to stop script using any hotkey you wish to setup.

I know that, but I have tried. This way, generated input can get lost. Code for testing:

HotKeySet("x", "_hotkeytest")
BlockInput(1)

Run("Notepad.exe", "", @SW_MAXIMIZE)
For $i = 1 To 500
    send($i & " " )
    Sleep(100)
Next
Func _hotkeytest()
    MsgBox(0,"Debug", "Ebbeh!")
EndFunc
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...