PDA

View Full Version : AutoIt 3.1.1.133 Beta beta


dbarrow
08-05-2006, 01:21 PM
http://fileforum.betanews.com/detail/AutoIt/968271279/1

Publisher's Description:

AutoIt is a simple tool that can simulate keystokes, mouse movements and window commands (maximize, minimize, wait for, etc.) in order to automate any windows based task (or even windowed DOS tasks). It was primarily designed to assist in automatically installing software that cannot be automatically installed by other means. This is most useful during a PC rollout where hundreds or thousands of client machines need to be automatically installed. However, it is not limited to software installation and can be used to automate most simple windows tasks
License: Freeware

COMMENTS
I've actually been using this as a full-blown scripting language. There's very little that can't be done with AutoIt. It doesn't replace languages such as BASIC or Python but it sure is a great addition to any programming/scripting toolkit

The possibilities are near endless. This tool allows you to quickly script things that are difficult to figure out how to do with C++ and the WinAPI.

For example, there are a few open/save dialog extenders out there (that extend all on the system), but most cost $$$, which isn't cool. So I made a tray script that sits around and finds an open/save dialog, and resizes it, sets an initial view on the file list, and gives the dialog transparency. Although a true "extender" would be able to do much more than that though the WinAPI and dialog hooks, it's a good start for just a 30 minute script.

It's even possible to make custom-drawn menus using this, although I eventually realized how insane that idea was and remade it in .NET instead. Still, it's possible to do lots of stuff outside automation.

One area where AutoIt excels is its documentation. From what I've seen there's an example for every command in the program. I can't think of another programming language, commercial or free that can claim that.

PeteF
08-06-2006, 04:23 PM
http://fileforum.betanews.com/detail/AutoIt/968271279/1

Publisher's Description:

AutoIt is a simple tool that can simulate keystokes, mouse movements and window commands (maximize, minimize, wait for, etc.) in order to automate any windows based task (or even windowed DOS tasks).


Doug, I tried AutoIt and all I can say is... WOW! This program is fantastic!
It's just what I've been looking for, for a long time. Thank you for posting!

Everyone who is familiar with VBA or VB6 or similar Basic programming will
immediately feel comfortable with AutoIT. I downloaded AutoIT and
also SciTE which is the script editor. I breifly browsed the AutoIT HELP
system and was shocked to see all the commands and tools that are
available for programming. I was thinking that this is the direction that
VB6 should have gone instead of that awful move to vb.net.

I only scratched the surface by exploring the possibilities that AutoIT
has to offer but I was most impressed that I can compile my script
(or full blown program) to a standalone *.exe that will run on any
windows PC without having to install anything!!! WOW!

AutoIT comes with a few sample programs but I felt I needed more.
I checked out the AutoIT forum and there are many posts that have
sample code you can copy & use. Support forums for AutoIT are the
AutoIT forum and I also found one for AutoIT in the Yahoo groups.
Sadly, no AutoIT group found in the Usenet Newsgroups.

Anyway, in a few short hours I did all the above and wrote my first
"TV GUIDE" program. The program (code listed below) starts my
SeaMonkey browser and opens the TV schedule webpage, each in a
separate tab for the 4 major networks; CBS, NBC, FOX, and ABC.
It then waits a few seconds for the ABC video to load and then uses
the mouse to shut that darn thing off!!! :mad: :) Next, it uses the
mouse to go to each tab and adjust the vertical scroll bar to position
the TV schedule for optimum viewing.

Below is the code. You can easilly modify the program to work on
your system by changing "Run" and "WinWaitActive" commands to
reflect the Mozilla or Firefox browser you are using.

Most likely, you will have to redo the mouse movements to match
your browser & screen resolution. To simplify things you can just
leave them out.

---pete---


;
; AutoIt Version: 3.0
; Language: English
; Platform: WinXP
; Author: Pete Federico
;
; Script Function:

; Run the application
Run("C:\Program Files\mozilla.org\SeaMonkey\seamonkey.exe")


; Wait for the app to become active - it is titled "SeaMonkey" note: case sensitive
WinWaitActive("SeaMonkey")


; Use AutoItSetOption to slow down the typing speed so we can see it :)
;AutoItSetOption("SendKeyDelay", 100)
Send("http://www.cbs.com/info/hdtv/index.php{enter}")
Send("^t")
Send("http://www.nbc.com/nbc/header/TV_Schedule/{enter}")
Send("^t")
Send("http://www.fox.com/schedule/{enter}")
Send("^t")
Send("http://abc.go.com/{enter}")

Sleep(2000)

;Note: All the code from this point to the end is for mouse movements & clicks.
;I did not write any of it. It was all generated automatically using SciTE,
;Tools -> AU3Recorder

#region --- ScriptWriter generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDete***iddenText",1)
Opt("MouseCoordMode",0)
WinWait("ABC.com - SeaMonkey","")
If Not WinActive("ABC.com - SeaMonkey","") Then WinActivate("ABC.com - SeaMonkey","")
WinWaitActive("ABC.com - SeaMonkey","")
MouseMove(703,474)
MouseDown("left")
MouseUp("left")
Sleep(1000)
MouseMove(563,472)
MouseDown("left")
MouseUp("left")
Sleep(1000)
#endregion --- ScriptWriter generated code End ---


#region --- ScriptWriter generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDete***iddenText",1)
Opt("MouseCoordMode",0)
WinWait("ABC.com - SeaMonkey","")
If Not WinActive("ABC.com - SeaMonkey","") Then WinActivate("ABC.com - SeaMonkey","")
WinWaitActive("ABC.com - SeaMonkey","")
MouseMove(794,225)
MouseDown("left")
MouseMove(793,502)
MouseUp("left")
Sleep(1000)
MouseMove(461,100)
MouseDown("left")
MouseUp("left")
Sleep(1000)
WinWait("FOX Broadcasting Company :: Schedule - This Week - SeaMonkey","")
If Not WinActive("FOX Broadcasting Company :: Schedule - This Week - SeaMonkey","") Then WinActivate("FOX Broadcasting Company :: Schedule - This Week - SeaMonkey","")
WinWaitActive("FOX Broadcasting Company :: Schedule - This Week - SeaMonkey","")
MouseMove(270,101)
MouseDown("left")
MouseUp("left")
Sleep(1000)
WinWait("NBC.com > Schedule - SeaMonkey","")
If Not WinActive("NBC.com > Schedule - SeaMonkey","") Then WinActivate("NBC.com > Schedule - SeaMonkey","")
WinWaitActive("NBC.com > Schedule - SeaMonkey","")
MouseMove(794,174)
MouseDown("left")
MouseMove(794,280)
MouseUp("left")
Sleep(1000)
MouseMove(104,99)
MouseDown("left")
MouseUp("left")
Sleep(1000)
WinWait("CBS.com - SeaMonkey","")
If Not WinActive("CBS.com - SeaMonkey","") Then WinActivate("CBS.com - SeaMonkey","")
WinWaitActive("CBS.com - SeaMonkey","")
MouseMove(798,174)
MouseDown("left")
MouseMove(793,277)
MouseUp("left")
Sleep(1000)
#endregion --- ScriptWriter generated code End ---


Exit
; Finished!