Jump to content
Sign in to follow this  
Guest petersoh

ControlDisable and ControlHide Not Working

Recommended Posts

Guest petersoh

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

Share this post


Link to post
Share on other sites

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

<{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 tried

BlockInput

--------------------------------------------------------------------------------

Disable/enable the mouse and keyboard.

BlockInput ( flag )

Parameters

flag 1 = Disable user input

0 = Enable user input

Return Value

None.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

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.

:lmao:

Share this post


Link to post
Share on other sites

...

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...