I'm in the middle of setting up a script that is essentially a master control panel for my desktop that allows me to have multiple different passwords for accounts over the internet while only needing to remember one password, as well as locking down any attempts to open windows or run certain processes.
The problem I've run into is that while everything else in my script is working as intended, the "BlockInput, On" is not working. While the script runs and is logging me into a website such as my email or facebook it is clicking and sending keystrokes that I'd like to avoid interrupting.
Below is just the part of the script for the automated log in process, but it's the only part of the script using "BlockInput, On". You can see that I have a "Sleep" after the "BlockInput, On" and during that it still allows me to move my mouse and click, as well as type out keystrokes, which I do not want to be allowed during that time. If anyone sees how I could resolve this please let me know:
[NOTE: Variables are in a different part of the script so don't worry, they're not empty strings.]
Progress, B1 P1 X809 Y900, Allow the automation to finish ..., Automiatic Log In, %WindowTitle% CoordMode, Pixel, Screen CheckWindow = Gmail: Email from Google Progress, 10 Run, http://www.gmail.com Progress, 20 WinWait, %CheckWindow%,, 5 WinMaximize, %CheckWindow% Progress, 30 BlockInput, On Progress, 40 Sleep, 2000 ImageSearch, XSearchGmailLoginField, YSearchGmailLoginField, 1124, 167, 1461, 245, *35 %A_ScriptDir%\GmailLoginField.jpg if ErrorLevel = 2 { Progress, Off MsgBox,0, %WindowTitle%, %WindowTitle% has encountered an error and could not open the file(s) needed. }else if ErrorLevel = 1 { Progress, Off Gosub, Error1071 Return }else{ Progress, 60 XClickGmailLoginField := XSearchGmailLoginField + 50 YClickGmailLoginField := YSearchGmailLoginField + 100 Click %XClickGmailLoginField% %YClickGmailLoginField% Progress, 70 Sleep, 50 Send, %Username1Gmail% Progress, 80 Sleep, 50 Send,{Tab} Sleep, 50 Send, %Password1Gmail% Progress, 90 Sleep, 50 Send,{Enter} } Progress, 100, The automation has completed!, Automiatic Log In, %WindowTitle% Sleep, 2000 Progress, Off BlockInput, Off Return