One picture say more than a thousand words. Because this in some cases I like to include a lot of images on my project documentations. Generally, these pictures are PrintScreens of consoles and their configurations and diagrams that explain some funcionality.
Benefits when you use pictures instead pure text on project documentations:
But, take screenshots of hundreds of screens and paste on Word documents aligned, formated and described can be a nightmare and take many hours. Or you can use AutoIt and drink a cup while see the autoit script do all documentation for you.
You can do scripts that take screenshots and interact with Word on VBS, but I think that AutoIt is much more simple, with ready functions to Send Keys, activate windows, recognize what window is open, find pixels on screen, etc. It is mean: AutoIT is a powerful tool that gives to you the ability to automate somethings that can be painful with vbs. And there is more 3 advantages: you can compile a .exe of your script, AutoIT is verrry simple and is entire FREE.
You can start with a simple script that writes something on Notepad (found on AutoIT help):
Run(”notepad.exe”)
;Open the notepadWinWaitActive(”Untitled – Notepad”)
;Stops the script while wait to Notepad Window appearSend(”This is some text.”)
;Send the text to NotepadWinClose(”Untitled – Notepad”)
;Send a close command to Notepad windowsWinWaitActive(”Notepad”, “Do you want to save”)
;Wait for Notepad ask you want save your fileSend(”!n”)
;Send the command ALT+N to say “No” to Notepad question
You can use with send all keyboard standard commands like alt, ctrl, arrows to up, down, left, right, Enter, tab, home, end, etc. And you can have multiple windows and navigate between then. You can find all commands, functions, methods and funcionalitys on Help of the software.
Can you see what you can do with this powerful tool? You can write a script that:
On next time that you need do a documentation of that console, you just need run your script and drink a coffee while wait.
See below a little code that capture screen from the Farm properties on Citrix Management Console for XenApp 4.5. To run this code, the focus on Citrix Access Management Console must to be on “Presentation Server” and all items below must to be colapsed. Word and Citrix Console must to be previosly opened.
AutoItSetOption(”SendKeyDelay”,1000)
Dim $x
WinActivate(”Citrix Access Management Console – \\Remote, 128-bit SSL/TLS.”)
Send(”{RIGHT}”)
Send(”{RIGHT}”);Farm Properties
Send(”{!ENTER}”)
For $x=1 to 40
Send(”!{PRINTSCREEN}”)
WinActivate(”Document2 – Microsoft Word”)
Send(”{ENTER}”)
Send(”^v”)
Send(”{ENTER}”)
WinActivate(”Citrix Access Management Console – \\Remote, 128-bit SSL/TLS.”)
Next
Send(”{ESC}”)
On future I wll post more complete scripts to do documentations.
One Response
Mcclain20Clarissa
June 24th, 2010 at 4:06 pm
1I propose not to hold off until you earn big sum of money to buy goods! You can just take the lowest-rate-loans.com or just student loan and feel free
RSS feed for comments on this post · TrackBack URI
Leave a reply