home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 January / chipcd20010102.iso / software / utilities / autoit / AutoIt_242.exe / %MAINDIR% / Examples / _Run_Me_First.aut next >
Encoding:
Text File  |  2000-11-28  |  2.5 KB  |  90 lines

  1. ;
  2. ; AutoIt Version: 2.3
  3. ; Language:       US English
  4. ; Platform:       Win9x/NT
  5. ; Author:         Jonathan Bennett (jbennett@hidden.demon.co.uk)
  6. ;
  7. ; Script Function:
  8. ;    Template AutoIt script.
  9. ;
  10.  
  11. ; Bring up a message box to give the user the chance to abort!
  12. 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?
  13. IfMsgBox, NO, Goto, IWantToQuit
  14.  
  15. ; Run Notepad
  16. Run, notepad.exe
  17.  
  18. ; Wait for the notepad window to appear, then type the introduction
  19. WinWait, Untitled - Notepad
  20. WinActivate, Untitled - Notepad
  21. WinMove, Untitled - Notepad,, 0, 0, default, default
  22. SplashTextOn, 300, 100, AutoIt, Please do not touch the keyboard during the script.
  23.  
  24. Send, Hello,{SPACE}
  25. Sleep, 500
  26. Send, and welcome to
  27. SetKeyDelay, 100
  28. Send, ............
  29. SetKeyDelay, 20
  30. Send, A u t o I t
  31. SetKeyDelay, 100
  32. Send, ............
  33. Sleep, 500
  34. Send, {ENTER 2}
  35. SetKeyDelay, 20
  36.  
  37. ; On with the demo....
  38. Send, AutoIt can automate tasks on your machine using a combination of:{ENTER}
  39. Sleep, 200
  40. Send, {TAB}- Keystroke simulation (including ALT{+} key combinations){ENTER}
  41. Sleep, 200
  42. Send, {TAB}- Mouse simulation (move, leftclick, rightclick, etc.){ENTER}
  43. Sleep, 200
  44. Send, {TAB}- Window functions (minimize, restore, hide, etc.){ENTER}
  45. Sleep, 200
  46. Send, {TAB}- Send and receive text with the clipboard{ENTER 2}
  47. Sleep, 200
  48.  
  49. Send, and many other simple commands{!} This makes AutoIt great for automating simple {ENTER}
  50. Send, tasks on your machine, or for configuring large number of machines in a rollout {ENTER}
  51. Send, situation.{ENTER 2}
  52. Sleep, 500
  53. Send, +{UP 12}{DEL}
  54.  
  55. ; And on...
  56. Send, Window Minimize{ENTER 2}
  57. WinMinimize, Untitled - Notepad
  58. Sleep, 500
  59. WinRestore, Untitled - Notepad
  60. WinActivate, Untitled - Notepad
  61.  
  62. Send, Window Move{ENTER 2}
  63. WinMove, Untitled - Notepad,, 0, 0, default, default
  64. Sleep, 250
  65. WinMove, Untitled - Notepad,, 0, 100, default, default
  66. Sleep, 250
  67. WinMove, Untitled - Notepad,, 50, 50, default, default
  68. Sleep, 500
  69.  
  70. Send, Change window titles{ENTER 2}
  71. WinSetTitle, Untitled - Notepad,, MY NOTEPAD WINDOW!!!!
  72. Sleep, 500
  73.  
  74. Send, +{UP 6}
  75. Send, {DEL}
  76.  
  77. ; And on...
  78. Send, Check the AutoIt website at http://www.hiddensoft.com/AutoIt/ for{ENTER}
  79. Send, other example scripts.{ENTER 2}Hopefully you will find something that is of use{! 4}
  80. Sleep, 1000
  81.  
  82. Send, +{UP 3}
  83. Send, {DEL}
  84. Send, !{F4}
  85.  
  86. SplashTextOff
  87.  
  88. IWantToQuit:
  89. Exit
  90.