Tim H. Posted March 16, 2009 Share Posted March 16, 2009 Running 3.3.0.0, even the canned BlockInput help example doesn't function correctly. BlockInput(1) Run("notepad") WinWaitActive("[CLASS:Notepad]") Send("{F5}") ;pastes time and date BlockInput(0) Running the example, compiled or not, I'm able to mouse around and type in the notepad session that opens. Has anyone else seen this? (USB keyboard & XP SP3) Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted March 16, 2009 Developers Share Posted March 16, 2009 (edited) When you run this script, can you also mouse around or type during the 60 second sleep() ? Jos BlockInput(1) Run("notepad") WinWaitActive("[CLASS:Notepad]") Send("{F5}");pastes time and date Sleep(60000) BlockInput(0) Edited March 16, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 16, 2009 Share Posted March 16, 2009 The script ends before you have time to type anything. BlockInput(0) is being called right after notepad is opened and the date/time is added. Link to comment Share on other sites More sharing options...
Tim H. Posted March 16, 2009 Author Share Posted March 16, 2009 (edited) I just realized there was no sleep in the example. When I put one in, the example worked fine. Now I have to figure out why the real script isn't functioning properly. I took someone elses word for it and thought I reproduced the problem with the example script. (duh). Thanks and sorry for the oversight. Running 3.3.0.0, even the canned BlockInput help example doesn't function correctly. BlockInput(1) Run("notepad") WinWaitActive("[CLASS:Notepad]") Send("{F5}") ;pastes time and date BlockInput(0) Running the example, compiled or not, I'm able to mouse around and type in the notepad session that opens. Has anyone else seen this? (USB keyboard & XP SP3) Thanks Edited March 16, 2009 by Tim H. Link to comment Share on other sites More sharing options...
Tim H. Posted March 16, 2009 Author Share Posted March 16, 2009 Turns out the person that was able to mouse and type during the BlockInput() was remoted into the machine that was running the script. As far as I'm concerned, in that scenario, all bets are off. BlockInput() was working fine from the local user's perspective.Thanks again.I just realized there was no sleep in the example. When I put one in, the example worked fine. Now I have to figure out why the real script isn't functioning properly. I took someone elses word for it and thought I reproduced the problem with the example script. (duh).Thanks and sorry for the oversight. Link to comment Share on other sites More sharing options...
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