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

PR - 13 Om

This document contains AutoIt script code to automate tasks in Microsoft Word. The script launches Wordpad, types two lines of sample text, saves the document as "sample_document.rtf", and closes Wordpad. It activates windows, sends keystrokes to type, enter text, and save the file, and includes sleep commands to wait between steps.

Uploaded by

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

PR - 13 Om

This document contains AutoIt script code to automate tasks in Microsoft Word. The script launches Wordpad, types two lines of sample text, saves the document as "sample_document.rtf", and closes Wordpad. It activates windows, sends keystrokes to type, enter text, and save the file, and includes sleep commands to wait between steps.

Uploaded by

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

Name : Omkar Mahajan Roll no.

:25

Practical 13
‘; Script Start - Add your code below here
; Run WordPad
run("C:\Program Files (x86)\Windows NT\Accessories\wordpad.exe")

; Wait for WordPad to become the active window


WinWaitActive("Document - WordPad")

; Type the text "This is Sample Example for Microsoft Word"


send("This is Sample Example for Microsoft Word")

; Press Enter
Send("{ENTER}")

; Type the text ""


Send("mr. Omkar Mahajan")

; Sleep for 5 seconds


sleep(5000)

; Close WordPad
WinClose("Document - WordPad")

; Press the Yes key to confirm the save prompt


send("!y")

; Activate the Save As dialog box


WinActivate("Save As")

; Press the Yes key to save the document


send("!y")

; Sleep for 1 second


sleep(1000)

; Type the file name "sample_document.rtf"


send("sample_document.rtf")

; Press Enter to save the document


Send("{ENTER}")

1
2

You might also like