home *** CD-ROM | disk | FTP | other *** search
Wrap
; ; AutoIt Version: 2.3 ; Language: US English ; Platform: Win9x/NT ; Author: Jonathan Bennett (jbennett@hidden.demon.co.uk) ; ; Script Function: ; Template AutoIt script. ; ; Bring up a message box to give the user the chance to abort! MsgBox, 4, Example (This script will only work with US English systems!), This script will perform some general automation using a few basic AutoIt commands.\nDo you wish to continue? IfMsgBox, NO, Goto, IWantToQuit ; Run Notepad Run, notepad.exe ; Wait for the notepad window to appear, then type the introduction WinWait, Untitled - Notepad WinActivate, Untitled - Notepad WinMove, Untitled - Notepad,, 0, 0, default, default SplashTextOn, 300, 100, AutoIt, Please do not touch the keyboard during the script. Send, Hello,{SPACE} Sleep, 500 Send, and welcome to SetKeyDelay, 100 Send, ............ SetKeyDelay, 20 Send, A u t o I t SetKeyDelay, 100 Send, ............ Sleep, 500 Send, {ENTER 2} SetKeyDelay, 20 ; On with the demo.... Send, AutoIt can automate tasks on your machine using a combination of:{ENTER} Sleep, 200 Send, {TAB}- Keystroke simulation (including ALT{+} key combinations){ENTER} Sleep, 200 Send, {TAB}- Mouse simulation (move, leftclick, rightclick, etc.){ENTER} Sleep, 200 Send, {TAB}- Window functions (minimize, restore, hide, etc.){ENTER} Sleep, 200 Send, {TAB}- Send and receive text with the clipboard{ENTER 2} Sleep, 200 Send, and many other simple commands{!} This makes AutoIt great for automating simple {ENTER} Send, tasks on your machine, or for configuring large number of machines in a rollout {ENTER} Send, situation.{ENTER 2} Sleep, 500 Send, +{UP 12}{DEL} ; And on... Send, Window Minimize{ENTER 2} WinMinimize, Untitled - Notepad Sleep, 500 WinRestore, Untitled - Notepad WinActivate, Untitled - Notepad Send, Window Move{ENTER 2} WinMove, Untitled - Notepad,, 0, 0, default, default Sleep, 250 WinMove, Untitled - Notepad,, 0, 100, default, default Sleep, 250 WinMove, Untitled - Notepad,, 50, 50, default, default Sleep, 500 Send, Change window titles{ENTER 2} WinSetTitle, Untitled - Notepad,, MY NOTEPAD WINDOW!!!! Sleep, 500 Send, +{UP 6} Send, {DEL} ; And on... Send, Check the AutoIt website at http://www.hiddensoft.com/AutoIt/ for{ENTER} Send, other example scripts.{ENTER 2}Hopefully you will find something that is of use{! 4} Sleep, 1000 Send, +{UP 3} Send, {DEL} Send, !{F4} SplashTextOff IWantToQuit: Exit