Jump to content
Sign in to follow this  
L0rdG1gabyt3

Checking status of, and Manipulating Checkboxes in Windows Programs

Recommended Posts

L0rdG1gabyt3

Hello. I am a technician at a small computer shop, and would like to automate some of my most routine tasks when it comes to certain services my shop provides. After careful consideration, I have decided to use AutoIt to do this.

My first script with AutoIt is supposed to open the Internet Options, and delete temporary internet files and cookies.

I am able to get the boxes open, but I need to check on the state of the checkboxes for IE8 to set them before clicking on the delete button. Here is the code I have written so far.

; Prompt the user to run the script - use a Yes/No prompt (4 - see help file)
$answer = MsgBox(4, "Delete Tempoary Files and Cookies (English Only)", "This script will Delete Temporary Internet Files and Cookies.  Run?")

; Check the user's answer to the prompt (see the help file for MsgBox return values)
; If "No" was clicked (7) then exit the script
If $answer = 7 Then
    MsgBox(0, "", "OK.  Bye!")
    Exit
EndIf

; Run the Internet Options Dialog box
Run("control inetcpl.cpl")

; Wait for the Internet Options Dialog to become active - it is titled "Internet Properties" on English systems
WinWaitActive("Internet Properties")

;Bring the Delete button into focus.
Send("{TAB}{TAB}{TAB}{TAB}")

;Press Delete button.
Send("{SPACE}")

;Wait for the Delete Browsig History box to become active - it is titled Delete Browsing History
WinWaitActive("Delete Browsing History")

That will bring us to the window with the checkbox list.

I have looked and looked, and perhaps I am kind of stupid when it comes to programming and scripting, but I can't seem to figure out where to go from here.

If anyone could point me in the right direction, I am sure I could be off and running in no time.

Share this post


Link to post
Share on other sites
bogQ

$answer = MsgBox(4, "Delete Tempoary Files and Cookies (English Only)", "This script will Delete Temporary Internet Files and Cookies.  Run?")
If $answer = 7 Then
    MsgBox(0, "", "OK.  Bye!")
    Exit
EndIf
Run("control inetcpl.cpl")
WinWaitActive("Internet Properties")
ControlSend("Internet Properties","",5501, "{SPACE}")
WinWaitActive("Delete Browsing History")
MsgBox(0,"",ControlCommand ("Delete Browsing History","",627, "IsChecked", ""))
ControlSend("Delete Browsing History","",627, "{SPACE}")
MsgBox(0,"",ControlCommand ("Delete Browsing History","",627, "IsChecked", ""))


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
L0rdG1gabyt3

I will try some of these options and report back with results!

Thanks!

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  

×