Jump to content

AutoIT Script Help


Recommended Posts

Okay, I'm getting frustrated with AutoIT here and I could use some help.

I'm using some scripts that someone posted to install Stardock apps, but I can't seem to get them to work right.

I take a clean VMWare PC, and execute the script, and it works perfectly.

I compile the script into an EXE and run that, it works perfectly.

So far, so good.

I add it to my unattended CD, and have XPLode run the compiled EXE and it will run, but the compiled script doesn't terminate. XPLode just stops, waiting for the script to end so it can move on. I pull up a list of the running processes and it shows my compiled EXE still running, even though the application is installed and no errors were generated.

I have a new ISO building where I took the execution out of XPLode and just added it to RunOnceEXE, but while CDImage is cranking away I thought I'd ask and see if I'm missing something simple.

Thanks

Link to comment
Share on other sites


The only reason I have seen why the AUTOIT script would hang is becaues it didn't get a window it expects. If there is a command like

WINWAIT("whatever")

and it never gets that window, it'll keep waiting for it.

My oponion is that you run the script in Windows, see if it hangs there, if it does, then modify the code.

Link to comment
Share on other sites

Without seeing the scripts, hard to pinpoint exactly the fault.

Put this at the top of the scripts. (I assume Autoit v3)

Opt("WinWaitDelay", 2000)

That will slow down the install, between windows, to save a possible error.

:)

Link to comment
Share on other sites

Couple of pointers

Use

Opt("TrayIconDebug", 1)

this will show the current script line in the tray icon. This helps to debug.

Use AdlibEnable() function to handle unforeseen errors. Some program installations do not show up certain screens if dependencies are not met.

Autoit forum is here.

Hope it helps

Link to comment
Share on other sites

Hey Mmarable, how do you convert the .au3 files into .exe files? I've looked in these forums and on the AutoIt forums, and haven't found any info on this yet.

Also, are you installing the Stardock apps from RunOnceEx? If so, what is the code you are using to get them to run?

Link to comment
Share on other sites

Nologic

heh would like to get the scripts to work correctly for every one's use.

You can use Select/Case/EndSelect for that. Pretty foolproof.

To show what I mean:

I dont have any of my scripts around but it shoud look something like this. Lets say we have an installation program with four dialog windows: Start, Select Folder, Install, End

While 1
Select
   Case WinExists ( "Start" ) = 1
       Commands
       WinWaitClose ( "Start" )
   Case WinExists ( "Select Folder" ) = 1
       Commands
       WinWaitClose ( "Select Folder" )
   Case WinExists ( "Install" ) = 1
       Commands
       WinWaitClose ( "Install" )
   Case WinExists ( "End" ) = 1
        Commands
        Exit
   Case Else
EndSelect
Sleep (1000)
Wend

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...