31290 Posted April 14, 2015 Posted April 14, 2015 Hi Everyone, I'm trying to find a way to assign a hotkey to stop a blockinput function, just in case anything goes wrong in my script. I took a look here : '?do=embed' frameborder='0' data-embedContent>> I also did some tests but this UDF "only" allows me to exclude some keys whereas I need a simple hotkey, F1 for example, that will release the blockinput. Maybe someone can give me a hand over here Thanks in advance, 31290. ~~~ Doom Shall Never Die, Only The Players ~~~
JohnOne Posted April 14, 2015 Posted April 14, 2015 You do realize why it is a bad idea to want user input to to stop a function that blocks user input right? If you are using BlockInput for any length of time where something might go wrong, you are probably using it foolishly to begin with too. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
31290 Posted April 14, 2015 Author Posted April 14, 2015 You do realize why it is a bad idea to want user input to to stop a function that blocks user input right? If you are using BlockInput for any length of time where something might go wrong, you are probably using it foolishly to begin with too. Yes I realized that but this is a requirement from my bosses. If anything goes wrong during the script execution, there's no way the users will have to reboot the computer to unlock mouse & keyboard. That's why I have to find a way to create a rescue key. ~~~ Doom Shall Never Die, Only The Players ~~~
SorryButImaNewbie Posted April 14, 2015 Posted April 14, 2015 well Ctrl-alt-del override blockinput in autoit anyway, or m'i wrong?
caramen Posted April 14, 2015 Posted April 14, 2015 Two way : Hotckeyset ("{F10}","BlockinputOff") Func BlockinputOff () BlockInput = 0 EndFunc Or CTRL + ALT + SUPR If you need a manual blockinput emergency shutoff both way are OK My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
31290 Posted April 14, 2015 Author Posted April 14, 2015 well Ctrl-alt-del override blockinput in autoit anyway, or m'i wrong? CTRL-ALT-DEL override blockinput as you said but as soon as I return to Windows or open Task Manager, the blockinput is back and you can't do anything. Two way : Hotckeyset ("{F10}","BlockinputOff") Func BlockinputOff () BlockInput = 0 EndFunc Or CTRL + ALT + SUPR If you need a manual blockinput emergency shutoff both way are OK Thanks, I'm gonna try and let you know ~~~ Doom Shall Never Die, Only The Players ~~~
Solution JohnOne Posted April 14, 2015 Solution Posted April 14, 2015 It does not work. how could it? #RequireAdmin HotKeySet("{F10}", "_Func") BlockInput(1) $timer = TimerInit() While TimerDiff($timer) < 10000 Sleep(10) WEnd Func _Func() BlockInput(0) EndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
31290 Posted April 17, 2015 Author Posted April 17, 2015 Sorry for the late response but thanks JohnOne, that helped a lot ~~~ Doom Shall Never Die, Only The Players ~~~
JohnOne Posted April 17, 2015 Posted April 17, 2015 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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