Jump to content

Repeat autoit script when Control class does not match


Recommended Posts

How to repeat my script when my control class does not match ?
 

My Script : winActivate ( " PS :: Version - 2.2.0.0  - [PS Bill]")
                  ControlClick ( "PS :: Version - 2.2.0.0  - [PS Bill]", "", "[NAME:btnSavebyFP]")
                  ControlSend(" PS :: Version - 2.2.0.0  - [PS Bill]", "", "[NAME:btnSavebyFP]", "{enter}")
                  WinActive ("Verification Number Entry ::")
                  ControlClick("Next >", "","[NAME:btnNext]")
;if   >>>> Control <<<<  does not match repeat my script, ;if match exit script

 


Class:    WindowsForm734a
Instance:    15
ClassnameNN:    WindowsForm34a15
Name:    BillPrint
Advanced (Class):    [NAME:BillPrint]
ID:    7875
Text:    
Position:    39, 310
Size:    1221, 306
ControlClick Coords:    745, 20
Style:    0x56010000
ExStyle:    0x00000000
Handle:    0x00000000000C0468

Edited by JLogan3o13
Link to comment
Share on other sites

  • Moderators

@Nareshm in the future, please use code tags in your posts <>. It makes it a lot easier to read. As to your question, every function in AutoIt return something regarding success/failure. Look at the help file entry for ControlClick, should give you some ideas on how to determine whether it succeeded or not.

If it is a matter of not clicking because the Control is renamed, look at some of the other functions in the help file such as ControlGetHandle

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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

×
×
  • Create New...