Jump to content

new to autoit


ebin
 Share

Recommended Posts

; Extract installer to temp dir.
DirCreate(@TempDir & '\daemon401-64')
If FileInstall('daemon401-64.exe', @TempDir & '\daemon401-64\', 1) Then
    Run(@TempDir & '\daemon401-64\daemon401-64.exe')
Else
    MsgBox(16, 'daemon401-64', 'Installer not found', 5)
    Exit(1)
EndIf

WinWaitActive("DAEMON Tools 4.01 (AMD64)")
Send("{ENTER 5}")
Sleep(500)
WinWaitActive("DAEMON Tools 4.01 (AMD64)" , "Completing the DAEMON Tools Setup Wizard")
Send("{SPACE}{ENTER}")

Func OnAutoItExit()
    DirRemove(@TempDir& '\daemon401-64', 1)
EndFunc

well... this sorta works for daemon tools... had to add the sleep command and I have not figured out how to get rid of teh toolbar. My autoit scripts always look like a 3 year olds coloring book. hehe

Edited by ebin
Link to comment
Share on other sites

You made a RAR SFX with template.exe and daemon401-64.exe in it and executing the fileinstalled daemon401-64.exe as well ? It should be FileInstall or SFX to accomplish this task. It does go startup crazy in a 32bit VMWare with multiple instances so you may want to check FAQ 14 in the AutoIt helpfile.

Link to comment
Share on other sites

thats right... i compiled it, but got an error. I can fix that. I wonder why it didnt go nuts over here??? I will fix the code.

this one is still an sfx, but fixed the au3

Edited by ebin
Link to comment
Share on other sites

Your blind Send()'s are causing the problem. The error window I receive is passing the WinWaitActive() as it has the same title. Then when no window is current it sends to the last item with focus, the script itself. You did not use FAQ 14 code on the last script ?

This seems to work ok, just for startup sequence for me.

$title = @ScriptName & ' Interpreter'
If WinExists($title) Then Exit
AutoitWinSetTitle($title)

 Run("daemon401-64.exe")
for $i = 1 to 5
    WinWaitActive("DAEMON Tools 4.01 (AMD64)")
    If WinExists('DAEMON Tools 4.01 (AMD64)', 'This platform is not supported') Then
        WinClose('DAEMON Tools 4.01 (AMD64)')
        Exit(1)
    EndIf
    Send("{ENTER}")
next
; Do not know about the rest.
Sleep(500)
WinWaitActive("DAEMON Tools 4.01 (AMD64)" , "Completing the DAEMON Tools Setup Wizard")
Send("{SPACE}{ENTER}")
Edited by MHz
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
 Share

  • Recently Browsing   0 members

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