Jump to content

How can I find and click on the checkbox?


Recommended Posts

post-53266-0-97914000-1306847932_thumb.ppost-53266-0-97914000-1306847932_thumb.pHello!

I need to find and click the checkbox, which is located at:

Control Panel -> Windows Update - > Select Updates to install:

then, there are many updates there (with their checkboxes)

Picture is attached.

I want to choose a specific one, and to mark it on its checkbox.

How can I click on any checkbox? AutoIt Window Info does not see it as a control.

Thanks!!!

Link to comment
Share on other sites

Try to use IE UDF.

That wouldn't work because the screen shot shows the control panel, not IE.

This may work (sending CTRL-A to select all):

send ("^a")

But I cannot test it right now. If that doesn't work, I think setting the focus to the first item and sending a space and then a down arrow would most definitely do the trick.

#include <ByteMe.au3>

Link to comment
Share on other sites

If the script is just for you, you could use cordinates to click the "check all checkboxes"-checkbox.

@sleepydvdr: Space+Down works

Edit:

Forgot to add this:

HotKeySet("^m","test")
HotKeySet("^n","runner")

Func test()
Global $handle
$handle = WinGetHandle("Velg oppdateringer som skal installeres"); Window title in norweigan
MsgBox(0,"",$handle);Just to see that i got the correct handle
ControlFocus($handle,"", "[CLASS:WuDuiListView; INSTANCE:1]");Sets the focus

EndFunc

Func runner()
    Send("{Space}")
    Send("{Down}")
EndFunc

While 1
    Sleep (40)
WEnd

Problem with the Space+down thing is if the check box is checked it will uncheck it.

I am a noob and i dont know the most, but shouldnt there be anything that can get that checkbox as a variable so someone can write Click ($checkbox)... ?

Edited by Maffe811

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Link to comment
Share on other sites

It can help!

Thanks!

If the script is just for you, you could use cordinates to click the "check all checkboxes"-checkbox.

@sleepydvdr: Space+Down works

Edit:

Forgot to add this:

HotKeySet("^m","test")
HotKeySet("^n","runner")

Func test()
Global $handle
$handle = WinGetHandle("Velg oppdateringer som skal installeres"); Window title in norweigan
MsgBox(0,"",$handle);Just to see that i got the correct handle
ControlFocus($handle,"", "[CLASS:WuDuiListView; INSTANCE:1]");Sets the focus

EndFunc

Func runner()
    Send("{Space}")
    Send("{Down}")
EndFunc

While 1
    Sleep (40)
WEnd

Problem with the Space+down thing is if the check box is checked it will uncheck it.

I am a noob and i dont know the most, but shouldnt there be anything that can get that checkbox as a variable so someone can write Click ($checkbox)... ?

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