0% found this document useful (0 votes)
231 views

Notepad Script

This document contains AutoIt code that was generated by an AutoRecorder tool to automate actions in Notepad. The code defines internal functions for setting up the recording environment and activating windows. It then runs Notepad, types sample text into the new document, clicks in the document, and dismisses the "Don't Save" dialog without saving when Notepad is closed.

Uploaded by

sumit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
231 views

Notepad Script

This document contains AutoIt code that was generated by an AutoRecorder tool to automate actions in Notepad. The code defines internal functions for setting up the recording environment and activating windows. It then runs Notepad, types sample text into the new document, clicks in the document, and dismisses the "Don't Save" dialog without saving when Notepad is closed.

Uploaded by

sumit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#region --- Au3Recorder generated code Start (v3.3.9.

5 KeyboardLayout=00000409)
--#region --- Internal functions Au3Recorder Start --Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr',
'')
If $aResult[1] <> '00000409' Then
MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layo
ut' & @CRLF & '(00000409->' & $aResult[1] & ')')
EndIf
EndFunc
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End --Run('C:\Windows\notepad.exe')
_WinWaitActivate("Untitled - Notepad","")
Send("{SHIFTDOWN}h{SHIFTUP}i,{ENTER}{SHIFTDOWN}t{SHIFTUP}his{SPACE}a{SPACE}a{SPA
CE}{BACKSPACE}{BACKSPACE}demo.{SPACE}{SHIFTDOWN}h{SHIFTUP}opefuly{BACKSPACE}ly{S
PACE}the{SPACE}last{SPACE}{BACKSPACE}{BACKSPACE}{BACKSPACE}{BACKSPACE}{BACKSPACE
}next{SPACE}script{SPACE}will{SPACE}be{SPACE}better.{ENTER}{ENTER}")
MouseClick("left",1101,9,1)
_WinWaitActivate("Notepad","Do&n't Save")
MouseClick("left",272,131,1)
#endregion --- Au3Recorder generated code End ---

You might also like