ryandao Posted February 2, 2005 Share Posted February 2, 2005 Hi everyone, I'm trying to push out a exe utiltiy and some users are pressing the Cancel button so the utility doesn't get install. The utility doesn't have a quiet install option. Is there a way to lock out user input or lockout the Cancel option? Thank you RD Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 2, 2005 Share Posted February 2, 2005 Hi everyone,I'm trying to push out a exe utiltiy and some users are pressing the Cancel button so the utility doesn't get install. The utility doesn't have a quiet install option. Is there a way to lock out user input or lockout the Cancel option?Thank youRD<{POST_SNAPBACK}>BlockInput --------------------------------------------------------------------------------Disable/enable the mouse and keyboard.BlockInput ( flag ) Parametersflag 1 = Disable user input0 = Enable user input Return ValueNone. RemarksIf BlockInput is enabled, the Alt keypress cannot be sent!The table below shows how BlockInput behavior depends on Windows' version; however, pressing Ctrl+Alt+Del on any platform will re-enable input due to a Windows API feature.Operating System "BlockInput" Results Windows 95 No effect. Windows 98/Me User input is blocked but AutoIt is also unable to simulate input. Windows NT 4 (Without ServicePack 6) No effect. Windows NT 4 (With ServicePack 6) User input is blocked and AutoIt can simulate most input. Windows 2000 User input is blocked and AutoIt can simulate most input. Windows XP User input is blocked and AutoIt can simulate most input. See exceptions below. If you are using Windows XP then you should be aware that a hotfix released inbetween SP1 and SP2 limited Blockinput so that the ALT key could NOT be sent. This is fixed in XP SP2.Note that functions such as WinMove() will still work on Windows 98/Me when BlockInput is enabled. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
SlimShady Posted February 2, 2005 Share Posted February 2, 2005 Check the ControlDisable function. Link to comment Share on other sites More sharing options...
ryandao Posted February 2, 2005 Author Share Posted February 2, 2005 I was able to block user iput...Thx BD Slim - I would prefer to block user from only the Cancel button if posible. What does ControlDisable control? I wasn't able to get the ControlDisable to do anything. Thx Link to comment Share on other sites More sharing options...
SlimShady Posted February 2, 2005 Share Posted February 2, 2005 ControlDisable disables any control (like a button, text area, combobox/dropdown box, etc). Use AutoIt3 Spy (found in your start menu), to check what the name is of the button. With that information you can disable the Cancel button. Link to comment Share on other sites More sharing options...
tazdev Posted February 3, 2005 Share Posted February 3, 2005 Also, a loooooooooooooooooooooooooooooooong time ago (Late 1900's) I wrote a script where I made a window maximized but transparent without the control buttons. I stayed on top of eveything until the script was done running. They could try to click on stuff but it was like I placed a big piece of glass on it Link to comment Share on other sites More sharing options...
CyberSlug Posted February 3, 2005 Share Posted February 3, 2005 Example of ControlDisable with Notepad: $title = "Untitled - Notepad" Run("notepad") WinWait($title) ControlSend($title, "", "Edit1", "some sample text") WinMenuSelectItem($title, "", "&File", "E&xit") ;close notepad ; Wait for the "Do you want to save changes?" dialog ; Let's disable the Cancel button on that dialog :) $title = "Notepad" WinWait($title) ControlDisable($title, "", "Cancel") Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! 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