Jump to content

Reverse 2 checked boxes


Pentium
 Share

Recommended Posts

Hello friends. I am new to AutoIt and love it at the first sight. I have a question that need your help. I start to write simple scripts to automate some software installations for my group now. One of the installation step provides a two check boxes which I want to uncheck one and check the other before sending the Next [send("!n")].

Windows title is "Remedy User"

The box that has checked mark named: Crystal Report

The box has no checked mark named: ODBC

There is no underscore text for those 2 items to send the !charcters. I need to reverse those two boxes, i.e. uncheck the Crystal Report and check the ODBC. Below that is the Next icon to go for next phase.

I don't know how to make it happen. Please help.

Regards,

Pentium.

Link to comment
Share on other sites

Look up "ControlCommand()" in the help file.

The Auto IT window info tool in "Start/programs/Autoit 3" will also be useful for this to identify the control id's

Hi, I use AutoIt Widows Info as you've said. It's great help to inquire the info. I found this control:

ControlCommand ("Title", "text", controlID, "command" ["option"])

as

ControlCommand ("Remedy", "Select Components", 401, "uncheck")

But the box I want to uncheck is at the left of "Crystal Reports", and the box and want to check is left of "ODBC".

Can someone help me how to let the ControlCommand selects the boxes next to those 2 texts, and perform check or uncheck command on them?

Cheers,

P.

Link to comment
Share on other sites

Hi, I use AutoIt Widows Info as you've said. It's great help to inquire the info. I found this control:

ControlCommand ("Title", "text", controlID, "command" ["option"])

as

ControlCommand ("Remedy", "Select Components", 401, "uncheck")

But the box I want to uncheck is at the left of "Crystal Reports", and the box and want to check is left of "ODBC".

Can someone help me how to let the ControlCommand selects the boxes next to those 2 texts, and perform check or uncheck command on them?

Cheers,

P.

If you hover over the two check boxes do they have a separate control ID
Link to comment
Share on other sites

If you hover over the two check boxes do they have a separate control ID

No, they don't have separate ControlID. When I ran the Windows Info and put the cursor over it I got the a big box that contains those two check boxes. The info shows below.

CotrolID: 401

ClassNameNN: ISAVIEWCMPTCLASS1

Text: ISAVIEWCMPTWINDOW

Style: 0x50010000

ExStyle: 0x0000000

Thanks,

P.

Link to comment
Share on other sites

No, they don't have separate ControlID. When I ran the Windows Info and put the cursor over it I got the a big box that contains those two check boxes. The info shows below.

CotrolID: 401

ClassNameNN: ISAVIEWCMPTCLASS1

Text: ISAVIEWCMPTWINDOW

Style: 0x50010000

ExStyle: 0x0000000

Thanks,

P.

If this is the case then I guess your best bet is to use mouse co-ordinates.

Using the info tool work out the co-ordinates of the 2 check boxes, and then probably using pixel checksum on the tick box(s) you could work out if it had a tick in it, you could then click the co-ordinates of the tick box and vice versa on the one you want to uncheck

Link to comment
Share on other sites

If this is the case then I guess your best bet is to use mouse co-ordinates.

Using the info tool work out the co-ordinates of the 2 check boxes, and then probably using pixel checksum on the tick box(s) you could work out if it had a tick in it, you could then click the co-ordinates of the tick box and vice versa on the one you want to uncheck

I figure I can do it that way but since each computer in the group might have different Desktop settings (size), so program it to click on certain coordinates might produce wrong input. Do you think so? I hope there are some other function, control to change it.

CHeers,

P.

Link to comment
Share on other sites

I figure I can do it that way but since each computer in the group might have different Desktop settings (size), so program it to click on certain coordinates might produce wrong input. Do you think so? I hope there are some other function, control to change it.

CHeers,

P.

Have a look at AutoItSetOption()

You can tell autoit to use co-ordinates relative to the screen or the active window.

Also you could winmove() the window to a specific area and size and also you may want to WinSetOnTop() too

Link to comment
Share on other sites

Have a look at AutoItSetOption()

You can tell autoit to use co-ordinates relative to the screen or the active window.

Also you could winmove() the window to a specific area and size and also you may want to WinSetOnTop() too

Being a newbee to AutoIt it might be a bit of reading, and trials and errors. I would read more on this but have no time now due to heavy work load. I would appreciate very much if you just show me the code line to do that in term of relative coordinates. I will try to learn more this weekend.

Cheers,

P.

Link to comment
Share on other sites

Seeing as your new around here...

AutoitSetOption("MouseCoordMode",0)

However a little word of advise, most people on this forum only help those who help themselves or at least put the effort in, most will insist you show what you have already tried.

Remember this and you'll go far around here :)

Link to comment
Share on other sites

You could always use a combination of {SEND}ing the {TAB} key and the {space} bar to navigate around the screen and change the setting of the check boxes, couldn't you? Save mucking around with mouse movements...

Edited by Confuzzled
Link to comment
Share on other sites

You could always use a combination of {SEND}ing the {TAB} key and the {space} bar to navigate around the screen and change the setting of the check boxes, couldn't you? Save mucking around with mouse movements...

Thank you. I'll read more on this and see whether I can send Tab and Space to do it.

P.

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