Sign in to follow this  
Followers 0
Guest Wellboy

Help needed!

8 posts in this topic

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! ;)

Share this post


Link to post
Share on other sites



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()


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Yes, "Button12" should work then...

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

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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!

Share this post


Link to post
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).

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