Jump to content

Issue with ControlCommand() in latest AutoIt Release


Recommended Posts

Hi, I am not able to check the check boxes available on a GUI window even after providing the below code.

WinWaitActive($variable1, "Destination Folder")

ControlCommand($variable1, "Add a shortcut to the &desktop", "Button4", "Check", " ")

ControlCommand($variable1, "Add a shortcut to the Quick &Launch bar", "Button5", "Check", " ")

Send("N")

Here $variable1 is the window title. Send command is used to click next button on that screen. Button4 and Button5 are the classnames of the controls.

The script pauses on this screen and check boxes do not get check.

Kindly let me know if anyone is facing this issue. i am using this ControlCommand() in the same script to select a radio button in one of the screens prior to the screen information mentioned above and its working fine. but the same implementation is not working for checking the check box on another screen.

Link to comment
Share on other sites

Hi, I am not able to check the check boxes available on a GUI window even after providing the below code.

WinWaitActive($variable1, "Destination Folder")

ControlCommand($variable1, "Add a shortcut to the &desktop", "Button4", "Check", " ")

ControlCommand($variable1, "Add a shortcut to the Quick &Launch bar", "Button5", "Check", " ")

Send("N")

Here $variable1 is the window title. Send command is used to click next button on that screen. Button4 and Button5 are the classnames of the controls.

The script pauses on this screen and check boxes do not get check.

Kindly let me know if anyone is facing this issue. i am using this ControlCommand() in the same script to select a radio button in one of the screens prior to the screen information mentioned above and its working fine. but the same implementation is not working for checking the check box on another screen.

Why are you changing the text used to ID the window? You correctly found it with "Destination Folder" in the WinWaitActive(), but then use other strings to ID the window for ControlCommand(). Are you sure it's matching? You might try this:
WinWaitActive($variable1, "Destination Folder")
ConsoleWrite("Debug: Window ID valid = " & WinExists($variable1, "Add a shortcut to the &desktop") & @LF)
ControlCommand($variable1, "Add a shortcut to the &desktop", "Button4", "Check")
ConsoleWrite("Debug: Window ID valid = " & WinExists($variable1, "Add a shortcut to the Quick &Launch bar") & @LF)
ControlCommand($variable1, "Add a shortcut to the Quick &Launch bar", "Button5", "Check")

muttley

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Why do you have an empty space in the "option" parameter?

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

Hi, Thank you all for the valuable comments. But actually i have found out the right problem. the main problem here was with the window text "Destination folder". I was using "Destination Folder" instead of "Destination folder" to identify the window.

Anyway, thanks for looking into the issue.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...