Sign in to follow this  
Followers 0
Pumagaju

"&Next >" button help

4 posts in this topic

I have a next button that is not initially enabled while the installer app does a systems check. Attempting to use a ControlCommand to wait for the button, but it doesnt appear to work. Any ideas? Also if there's a better way to do this I'd love to hear it.

ControlCommand ( "xyz", "Welcome", "[ID:4366]", "IsEnabled", "" )

Thanks!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

This code is meant for using in a Window that you did not create:

ControlCommand ( "xyz", "Welcome", "[ID:4366]", "IsEnabled", "" )

If your code does not create the window, try using a null string - "" - for the text parameter, and using WinGetHandle and ControlGetHandle to the window and the control, respectively. It just does not seem right to repeatedly make AutoIt try to figure out which control you are refering to the way this code does it, probably in some loop, huh?

Probably more useful - try using the AutoIt Window Info tool to get the ClassnameNN of the control, and use this:

"[CLASSNN:toolResultsGoHere]"

in place of this:

"[ID:4366]"

Post more of the surrounding code.

Edited by Squirrely1

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites

This code is meant for using in a Window that you did not create:

ControlCommand ( "xyz", "Welcome", "[ID:4366]", "IsEnabled", "" )

If your code does not create the window, try using a null string - "" - for the text parameter, and using WinGetHandle and ControlGetHandle to the window and the control, respectively. It just does not seem right to repeatedly make AutoIt try to figure out which control you are refering to the way this code does it, probably in some loop, huh?

Probably more useful - try using the AutoIt Window Info tool to get the ClassnameNN of the control, and use this:

"[CLASSNN:toolResultsGoHere]"

in place of this:

"[ID:4366]"

Post more of the surrounding code.

Here is a snippet of the surrounding code of what I'm trying to accomplish. An automated install of IBMs Rat ReqPro:

WinWaitActive ("IBM Rational RequisitePro LaunchPad", "Install IBM Rational RequisitePro")
 Sleep(1000)
 Send ("{ENTER}"); Install IBM Rational RequisitePro

If WinWaitActive("IBM Rational Setup Wizard", "InstallShield scripting engine", 3) Then; Wait 3s, then move on
 Sleep(1000)
 Send ( "!y" ); yes
EndIf

WinWaitActive ("IBM Rational RequisitePro - Setup Wizard", "Welcome")
 Sleep(1000)
; ControlCommand ( "IBM Rational RequisitePro - Setup Wizard", "Welcome", "[ID:4366]", "IsEnabled", "" );wait for next > to enable
 ControlCommand ( "IBM Rational RequisitePro - Setup Wizard", "Welcome", "[CLASSNN:MsiDialogCloseClass]", "IsEnabled", "" );wait for next > to enable
    MsgBox(64, "SIC - Complete", "STOP!")
 Send ("!n"); next after enabled  

WinWaitActive ("IBM Rational RequisitePro - Setup Wizard", "Product Warnings")
 Sleep(1000)
 Send ("!n"); next

Using the WinInfo tool I could not find any reference to CLASSNN but I did see a Class: MsiDialogCloseClass so I tried that. But the script still doesnt wait for the button to enable.

Thanks,

Share this post


Link to post
Share on other sites

Using the WinInfo tool I could not find any reference to CLASSNN but I did see a Class: MsiDialogCloseClass so I tried that. But the script still doesnt wait for the button to enable.

Thanks,

Look here how to wait for enabled button.

ControlCommand must be in While .. WEnd loop.

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  
Followers 0