Jump to content

ControlClick


 Share

Recommended Posts

Hi,

I've come on here to ask for help as a last resort. I have a little script to run through an install. I've managed to get ot to de-select various install components, but can not for the life of me get it to click 'no restart'. Please can someone tell me where I'm going wrong, in simplistic terms?

The line it fails on is the 'ControlClick' one. I have put a ; in front of the one after that,  so that I don't have to sit through repeated reboots for my every attempt! The attatched file should show the required properties of the check field I want.

Thank you

help1.jpg

Edited by Jojoba77
typo
Link to comment
Share on other sites

Don't use control sends...controlSetText is much better.

Specifically, for you checkboxes, use ControlCommand to make the checkbox 'check'ed.

I'd also suggest you use the ID of your controls...but installers are fairly stagnant, so it shouldn't matter.

Make sure the window you are performing action on is 'active', and the control you are doing action on is focused (controlfocus)...that will help you get up the accuracy.

Last suggestion is to use the silent command line params so you don't need to automate any of the app.

There are other little pitfalls in automating apps.  In the long run, you'll need to create functions to loop for ALL the necessary window states to be present, and another loop to wait for your control to be created.  It's possible you are attempting to click a control that hasn't been painted yet.

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.
Link to comment
Share on other sites

Your setup seems to be made by Installshield.

Usually, an Installshield installation can be automated with something like setup.exe /s /v" /qb /norestart" (or use /qn for a silent install)

Link to comment
Share on other sites

 

There are other little pitfalls in automating apps.  In the long run, you'll need to create functions to loop for ALL the necessary window states to be present, and another loop to wait for your control to be created.  It's possible you are attempting to click a control that hasn't been painted yet.

Ah, thats a horrible downside. I had noticed it presented with a different install after an uninstall (it seems to retain some of your selectsions despite uninstalling)

Link to comment
Share on other sites

Your setup seems to be made by Installshield.

Usually, an Installshield installation can be automated with something like setup.exe /s /v" /qb /norestart" (or use /qn for a silent install)

I shall try this again too, it's the prefered method.

 

Thanks for all the feedback!

Link to comment
Share on other sites

you used ControlSetText to 'send' the {enter} :)...that's why the text was modified to {enter}...to set the checkbox, look at ControlCommand in the help file.

You should never have to send enter to do what you want...you should always use ControlClick if it's a button, or ControlCommand to set check or uncheck on a checkbox (which is also a form of a button)

Also, just because an installer is created by installshield, doesn't mean the .iss files are present to do the silent install/update/uninstall...The provider would need to actually record the scenarios, and package them in.

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.
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...