Main menu:


Site search

My Wife’s Website

Recent Posts

Categories

Archives

 

October 2008
S M T W T F S
« Sep   Nov »
 1234
567891011
12131415161718
19202122232425
262728293031  

Links:

Meta

Script anything with AutoIt

As part of my work, I have to run a little utility (dsimporta for those at work) to import some data.  It was really never meant to be used very much so it is just a windows application, but I use it quite often.  I am a keyboard user and over time had optimized my usage of this application to a well worn series of keystrokes.

I finally got tired of doing this and remembered that I had ran across AutoIt a while ago.  It is a scripting environment that can automate Windows GUI and other general scripting with a BASIC-like language.  You can package everything (including the runtime) into a small executable.  I tried this with my 7 line script and it generated a 252K executable.

Here is my script:

Run(“dsimporta.exe”, “c:\i3\ic\server”)
WinWaitActive(“Import DS Test”)
Send(“{TAB}{ENTER}”)
WinWaitActive(“Open”)
Send(“provision.dsi!o”)
WinWaitActive(“Import DS Test”)
Send(“{TAB}Common{TAB}CustomerSite{TAB}{TAB}{TAB}{SPACE}{TAB}{SPACE}{TAB}{TAB}{TAB}{TAB}{SPACE}{TAB}{SPACE}”)

Write a comment