L0rdG1gabyt3 Posted March 2, 2010 Posted March 2, 2010 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.
bogQ Posted March 2, 2010 Posted March 2, 2010 $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 connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
AdmiralAlkex Posted March 2, 2010 Posted March 2, 2010 Maybe the old way still works. Use Run() and this. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
L0rdG1gabyt3 Posted March 3, 2010 Author Posted March 3, 2010 I will try some of these options and report back with results! Thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now