Guest petersoh Posted February 20, 2005 Share Posted February 20, 2005 Hi, I am trying to do an automatic WinZip installation (winzipinstall.au3, in the tutorial), in the process of installation, i would like to disable/hide some control buttons, like "cancel", "info". but when i used either ControlDisable or ControlHide Function, both cannot work. However when i to run it on the npad.au3 in the tutorial, it works. Any idea what's wrong. Here are a sample of the script: run("C:\AutoItScript Tutorials\WinZip 9.0 SR1\winzip90.exe",3) WinWaitActive("WinZip® 9.0 SR-1 Setup","&setup") ControlDisable("WinZip® 9.0 SR-1 Setup","Cancel",2) send("!s") Thanks Peter Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 20, 2005 Share Posted February 20, 2005 (edited) Hi,I am trying to do an automatic WinZip installation (winzipinstall.au3, in the tutorial), in the process of installation, i would like to disable/hide some control buttons, like "cancel", "info". but when i used either ControlDisable or ControlHide Function, both cannot work. However when i to run it on the npad.au3 in the tutorial, it works.Any idea what's wrong.Here are a sample of the script:run("C:\AutoItScript Tutorials\WinZip 9.0 SR1\winzip90.exe",3)WinWaitActive("WinZip® 9.0 SR-1 Setup","&setup")ControlDisable("WinZip® 9.0 SR-1 Setup","Cancel",2)send("!s")ThanksPeter<{POST_SNAPBACK}>First things first. Is "Cancel" REALLY the name of the control? I don't think so. Try running the AU3 Windows Information tool on that, hover your mouse over the "Cancel" button, and hold Ctrl-Alt-F to freeze the WinInfo. Then you can code what the button's name REALLY is. Also, failing that, have you triedBlockInput --------------------------------------------------------------------------------Disable/enable the mouse and keyboard.BlockInput ( flag ) Parametersflag 1 = Disable user input0 = Enable user input Return ValueNone. Edited February 20, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
MHz Posted February 20, 2005 Share Posted February 20, 2005 Cancel is the window text value. Not the control text value. So that parameter could be correct. Controlid 2 would possibly sound right also? Just double check yout text etc. Link to comment Share on other sites More sharing options...
bastel123 Posted February 20, 2005 Share Posted February 20, 2005 ...Here are a sample of the script:run("C:\AutoItScript Tutorials\WinZip 9.0 SR1\winzip90.exe",3)WinWaitActive("WinZip® 9.0 SR-1 Setup","&setup")ControlDisable("WinZip® 9.0 SR-1 Setup","Cancel",2)send("!s")<{POST_SNAPBACK}>run("C:\AutoItScript Tutorials\WinZip 9.0 SR1\winzip90.exe",3); The ButtonText is "&Setup" and not "&setup" ; ###########WinWaitActive("WinZip® 9.0 SR-1 Setup","&Setup"); ###########ControlDisable("WinZip® 9.0 SR-1 Setup","Cancel",2)send("!s")Sebastian 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