Jump to content

can some1 explain to me how to use autoit?


kurt476

Recommended Posts


i thought some1 be better to explain to instead of reading the help

This kills me. You won't read the help file, but you WILL read someone's regurgitation of the help file? I'm beginning to understand the caustic comments of longtime forum members toward newbies, a group that I proudly claim lifetime membership.

Heck, I spent three months with AutoIt before I finally got it right, sort of. You want it in one shot? Unless you're a programmer, it's going to take some RESEARCH.

Git yer butt out from under your Xbox/Playstation and READ! :realmad:

Sorry, had to get that off my chest. :P

Link to comment
Share on other sites

the help files don't help me as well as the ppl do they don't show you how to do the basics of writing the scripts

it is diffecly for me to write a script even if you haven't done it before i'm not that kind of programer.

Link to comment
Share on other sites

@kurt476

Sorry 'bout the earlier flame, but take heart. You are in exactly the right place. In fact, you sound just like me about a year and a half ago. I was where you are: I didn't know doodly-squat about shine-olaah!

Then I started to do some searching and stumbled across that whole WINNT.SIF thingy. Once I got that under my belt, I started messing with AutoIt. In fact, I did my ENTIRE post install via AutoIt scripts. Need I tell you how many hours I spent carefully making sure that every single thing was juuuust right, 'cause if it wasn't, well, then the script would fail. That's how I learned that "attention to detail" matters.

Finally, I stumbled across this forum. Been here ever since. I have learned to use RegSnap, InstallRite, nLite, ORKTools, MSI editors, Hex editors, batch files, .vbs scripts, RAID driver installs via txtsetup.sif, and the all important registry. You name it, no challenge is too great anymore. It has been a real education. And along the way I have learned about Windows: what makes it tick and stuff like that there. Tell you what, you know how during the install you can see the file names flying by? I now know what many of them are, why they are there, what they do. Wow.

As far as this forum goes, I'm a junior member stumbling along and learning like most of us. In my local community, however, I am regarded as a computer "expert." You can do this thing...one step at a time. Good luck, mi amigo. :hello:

Link to comment
Share on other sites

A script for Free Download Mgr for example.

$title is a variable. Opt(W...) forces windows to show every 2 seconds. Blockinput stops the keyboard & mouse messing things up. Run starts execution of Free Download Mgr. Winwait waits for a particular window title with certain text, in it to appear. ControlClick directly presses the controls (buttons etc). Sleep make the script sleep. The install completes. A splash pops up to show a cleanup is in progress. FileDelete removes a shortcut. Splash finishes along with keyboard & mouse control is restored.

Dim $title = "Setup - Free Download Manager"

Sleep(2000)
Opt("WinWaitDelay", 2000)
BlockInput(1)

Run(@ScriptDir & "\Free_DM_v1.0.exe")

WinWait($title, "This will install Free Download Manager")
ControlClick($title, "This will install Free Download Manager", "TButton1")

WinWait($title, "Please read the following important information")
ControlClick($title, "Please read the following important information", "TRadioButton1")
Sleep(1000)
ControlClick($title, "Please read the following important information", "TButton2")

WinWait($title, "Setup will install Free Download Manager")
ControlClick($title, "Setup will install Free Download Manager", "TButton3")

WinWait($title, "Setup will create the program's shortcuts")
Sleep(1000)
ControlFocus($title, "Setup will create the program's shortcuts", "TEdit1")
ControlSend($title, "Setup will create the program's shortcuts", "TEdit1", "Internet\Download Manager", 1)
Sleep(2000)
ControlClick($title, "Setup will create the program's shortcuts", "TButton4")

WinWait($title, "Select the additional tasks you would like Setup")
Sleep(1000)
Send("{SPACE}{TAB 2}{SPACE}")
Sleep(1000)
ControlClick($title, "Select the additional tasks you would like Setup", "TButton4")

WinWait($title, "Setup is now ready to begin installing")
ControlClick($title, "Setup is now ready to begin installing", "TButton4")

WinWait($title, "Setup has finished installing")
Sleep(1000)
Send("{SPACE}")
Sleep(1000)
ControlClick($title, "Setup has finished installing", "TButton4")

;  -- Cleanup --

Sleep(1000)
SplashTextOn("", "Cleaning up", 130, 25, -1, -1, 1, "", 14)
Sleep(2000)

FileDelete(@ProgramsCommonDir & "\Internet\Download Manager\Free Download Manager on the Web.lnk")

BlockInput(0)
SplashOff()
Sleep(2000)

Link to comment
Share on other sites

@blinkdt

I understand you feel. It didn't take me as long as you did to learn autoit (only because I've done programming and scripting before) but I'm still far from being an expert. I usually don't use autoit anymore because I like creating silent installs with Inno Setup and for everything else I use your typical batch files.

@kurt476

It takes time with autoit. Just work at it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...