Created
April 22, 2010 19:45
-
-
Save luisbebop/375716 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'win32ole' | |
# based on this tutorial http://www.autoitscript.com/autoit3/docs/tutorials/notepad/notepad.htm | |
# 1. Download http://www.zapt.in/9Qt | |
# 2. Put the AutoItX3.dll on c:\windows\system32 | |
# 3. Open the DOS Prompt and register the dll with: "regsvr32 C:\windows\system32\AutoItX3.dll | |
# 4. Install Ruby if you don't have it already installed: http://www.rubyinstaller.org/ | |
# 5. Execute this file | |
@au3 = WIN32OLE.new "AutoItX3.Control" | |
@au3.Run "c:\\windows\\notepad.exe" | |
@au3.WinWaitActive "Untitled - Notepad" | |
@au3.Send "This is some text." | |
@au3.Send "!Fx" #or @au3.WinClose("Untitled - Notepad") | |
@au3.WinWaitActive "Notepad", "Do you want to save" | |
@au3.Send "!n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment