Jump to content

Help needed!


Guest Wellboy
 Share

Recommended Posts

Hi,

Somebody please help!!! I have no clue how to code, but I like the idea of Autoit.

I want to create a script which ticks or unticks a checkbox. I know the Control ID thanks to the info tool, but I don't know the command to click OK or apply the change after the control activation. Does this make sense?

If anyone can help I'd really appreciate it!

Wellboy! ;)

Link to comment
Share on other sites

  • Developers

Hi,

Somebody please help!!! I have no clue how to code, but I like the idea of Autoit.

I want to create a script which ticks or unticks a checkbox. I know the Control ID thanks to the info tool, but I don't know the command to click OK or apply the change after the control activation. Does this make sense?

If anyone can help I'd really appreciate it!

Wellboy! ;)

To select a Checkbox use:

ControlSend("window","text","controlid","{NUMPADADD}")

or

ControlCommand("window","text","controlid","Check", "")

To deselect:

ControlSend("window","text",,"controlid","{NUMPADSUB}")

or

ControlCommand("window","text","controlid","UnCheck", "")

To click the OK button check for its Controlname and do a

ControlClick()

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

To select a Checkbox use:

ControlSend("window","text","controlid","{NUMPADADD}")

or

ControlCommand("window","text","controlid","Check", "")

To deselect:

ControlSend("window","text",,"controlid","{NUMPADSUB}")

or

ControlCommand("window","text","controlid","UnCheck", "")

To click the OK button check for its Controlname and do a

ControlClick()

Thanks for your help.

I can't find the Controlname for the OK button. All I can see is:

Control ID: 1

ClassNameNN: Button12

Is it one of these you are referring to?

Link to comment
Share on other sites

  • Developers

Thanks for your help.

I can't find the Controlname for the OK button. All I can see is:

Control ID: 1

ClassNameNN: Button12

Is it one of these you are referring to?

Yes, "Button12" should work then...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Sorry, It still doesn't work. Can you see any problem with my script?

It is attached if you would take a look. Thanks.Set_Internet_Proxy.au3

This doesn't look right:

ControlSend ( "Local Area Network (LAN) Settings", "text", 1570,"{NUMPADADD}")

ControlClick ( "Local Area Network (LAN) Settings", "OK", 1 )

The second parameter should be either "" or some text on the page.

ControlSend ( "Local Area Network (LAN) Settings", "", ???? ,"{NUMPADADD}")

ControlClick ( "Local Area Network (LAN) Settings", "", "button12" )

Replace the ????? controlid name of the checkbox..

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

This doesn't look right:

ControlSend ( "Local Area Network (LAN) Settings", "text", 1570,"{NUMPADADD}")

ControlClick ( "Local Area Network (LAN) Settings", "OK", 1 )

The second parameter should be either "" or some text on the page.

ControlSend ( "Local Area Network (LAN) Settings", "", ???? ,"{NUMPADADD}")

ControlClick ( "Local Area Network (LAN) Settings", "", "button12" )

Replace the ????? controlid name of the checkbox..

It still doesn't work! I am missing something really simple I'm sure.

If you have any other ideas, I would be very pleased!

Link to comment
Share on other sites

Could you please post an updated version of where you're at?

You may wish to look at the ControlCommand() function, which is specifically designed to (among other things) tick and untick tickboxes. All it will need is the correct window and the correct control ID (or class name and number -- whatever uniquely identifies the control within the 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...