Jump to content
Sign in to follow this  
aleph01

ControlDisable issues

Recommended Posts

aleph01

Greetings, and thanks in advance for any help.

My experiments attempting to get ControlDisable to actually disable a control have been a failure. So far, I’ve only tried this on Notepad, but, although Notepad is grayed out, it still takes input during my sleep interval (the input is gray as well) and when I run ControlEnable a few seconds later, the text becomes black. It’s a little amusing, but I must be using ControlDisable incorrectly.

Run ("notepad.exe")
WinWait ("Untitled")
ControlDisable("Untitled", "", 15)
Sleep (10000)
ControlEnable("Untitled", "", 15)

Meds.  They're not just for breakfast anymore. :'(

Share this post


Link to post
Share on other sites
jdelaney

Run ("notepad.exe")
WinWait ("Untitled")
ControlHide("Untitled", "", 15)
ControlFocus("Untitled", "", 1025)
Sleep (5000)
ControlShow("Untitled", "", 15)

or:

Run ("notepad.exe")
WinWait ("Untitled")
ControlDisable("Untitled", "", 15)
ControlFocus("Untitled", "", 1025)
Sleep (5000)
ControlEnable("Untitled", "", 15)

main point is to focus on something else, after disabling

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
aleph01

Thanks, jdelaney. That should be mentioned in the Help file. :)


Meds.  They're not just for breakfast anymore. :'(

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.