Google

Sunday, February 10, 2008

AutoIT Scripting

Learning up AutoIT Scripting Language. Planning to write automated scripts for OANDA later on once I have familiarized myself with this wonderful tool from:

http://www.autoitscript.com/autoit3/


Thanks to this post:

http://www.cyrox.com/forum/index.php?topic=152.0



Now, learning by practising.
Below is an AutoIT script I've written to start Winzip 111 installation and cancel it at the last stage:


Run("winzip111.exe")
WinWaitActive("WinZip® 11.1 Setup","&Setup")
Send("!S")
WinWaitActive("WinZip Setup - WinZip E-Mail Companion")
Send("!N");
Send("{ENTER}")
WinWaitActive("WinZip Setup - Carbonite's Online Backup Service")
Send("!N");
Send("{ENTER}")
WinWaitActive("WinZip 11.1 Setup","Installation Wizard")
Send("!N")
WinWaitActive("WinZip 11.1 Setup","accept the license agreement")
ControlClick("WinZip 11.1 Setup","accept the license agreement",1008)
WinWaitActive("WinZip 11.1 Setup","Installation is not complete")
Send("!E")


Some useful scripts

To call a java app:
Run("cmd.exe");open cmd
WinWaitActive("C:\WINDOWS\system32\cmd.exe");get a focus
Send("cd c:\javaProject {ENTER}");change dir
Send("javac something.java {ENTER}");compile java file
Send("java something {ENTER}");run java class
Send("exit {ENTER}");exit cmd




Other Strategy for java applets:

Get the coordinates of the associated EMBED or OBJECT tag and then click relative to its geometry. See the examples for _IEPropertyGet for a starter.

you can trigger off of pixel colors (PixelGetColor)... _IEPropertyGet will give you coordinates of an object you can use

can access the menus and click on certain points in the window using the mouse co-ordinates or by using Send("!f") {ENTER}



1 comment:

Unknown said...

As stated by Stanford Medical, It is indeed the ONLY reason this country's women get to live 10 years longer and weigh 19 KG less than us.

(And by the way, it really has NOTHING to do with genetics or some hard exercise and EVERYTHING related to "HOW" they are eating.)

P.S, What I said is "HOW", not "what"...

Tap on this link to determine if this short questionnaire can help you discover your real weight loss possibility