Jump to content

Beginner, need help with checkbox script


Recommended Posts

I'm new to AutoIT and programming in general.  I've just started a new job and found a task that seems would be great to automate, and learn a little in the process.  I have a program that opens a form/window, and there are various checkboxes, radio buttons and fill-in-the-blanks.  The window is IE HTML I believe.  I can right-click, view source and a text file with HTML code pops up.

I want to write a script that will start at the top of the form, move to an element, and if that element is a checkbox then make sure its checked.  Then move to the next element until the end of the form.  It doesn't need to uncheck anything, and it doesn't need to do anything with the radio buttons or blanks.

The issue I'm having is how to view if a box is already checked or unchecked, and how to handle a form of unknown length.

Thanks.

Link to comment
Share on other sites

Give it a shot:

_IEFormElementRadioSelect
_IEFormElementCheckBoxSelect

; look into all the _ie functions...they have examples
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

 

Give it a shot:

_IEFormElementRadioSelect
_IEFormElementCheckBoxSelect

; look into all the _ie functions...they have examples

Hmmm.  I'm thinking I've already hit a roadblock.  Using the AutoIT Window viewer, it looks like the CLASS of the program is "WindowsForms10.Window.8.app9".  So I'm assuming the the IE_FUNCTIONS module is off-limits, even though the program is HTML based. 

Any suggestions? I'm able to do the base level "{TAB}{SPACE}{TAB}{SPACE}" etc to check a box, then tab to the next one but that comes with a ton of issues.

Edited by blehbloo
Link to comment
Share on other sites

 The window is IE HTML I believe.  I can right-click, view source and a text file with HTML code pops up.

So...is it an embedded browser, or have nothing to do with IE?

If it's an actual window, then you can use the Control* functions...as an example, but read up on all of them

ControlCommand

Else, _IEAttach can attach to the embedded browser.

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

So...is it an embedded browser, or have nothing to do with IE?

If it's an actual window, then you can use the Control* functions...as an example, but read up on all of them

ControlCommand

Else, _IEAttach can attach to the embedded browser.

There is no browsing per say, the page is just HTML based. 

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