#include #include #include ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT ; Author: Jonathan Bennett (jon at autoitscript dot com) ; ; Script Function: ; Opens Notepad, types in some text and then quits. ; The text typed shows two ways of Sending special ; characters ; Local $hDLL = DllOpen("user32.dll") Local $toggle = False; Local $text = "Off" HotKeySet("{x}", "TogglePause") HotKeySet("{<}", "ExitProcess") Local $windowText = SplashTextOn("POW", $text, 80, 60, -1, -1, $DLG_MOVEABLE, "", 24) While 1 While $toggle == True Send("{SPACE}") Send("{3}") Sleep(200) Send("{2}") Sleep(3000) WEnd WEnd Func TogglePause() $toggle = Not $toggle If $toggle == True Then ControlSetText($windowText, "POW", "Off", "On") Else ControlSetText($windowText, "POW", "On", "Off") EndIf EndFunc Func ExitProcess() Exit 0 EndFunc DllClose($hDLL)