Jump to content

Script will not exit?


namthor
 Share

Recommended Posts

I created this script to automate the installation and configuration of an application we are trying to deploy to all of our workstations. It works perfectly . . . except it won't exit! It just hangs out paused in the system tray until I manually exit it. Why is Exit not working here??? Bear in mind this is pretty much my first script ever.

CODE
If FileExists(@AppDataDir & "\FaxFinder Client Software\options.ini") Then

Exit

Else

DirCreate(@AppDataDir & "\FaxFinder Client Software")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "address book sync", "addressbookpath", "Outlook:")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "advanced settings", "addressbookpath", "Outlook:")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "advanced settings", "enableoutlooksync", "0")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "advanced settings", "minimizeaftersend", "1")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "advanced settings", "minimizeonclose", "1")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "date time", "dateformat", "MM-DD-YYY")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "date time", "timeformat", "12 hour")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax finder device0", "devicetype", "FaxFinder")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax finder device0", "enabled", "1")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax finder device0", "firewall", "0")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax finder device0", "ipaddress", "192.168.1.52")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax finder device0", "password", @UserName)

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax finder device0", "username", @UserName)

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax retry", "retrycount", "2")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax retry", "retryinterval", "300")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "fax retry", "retrykilltime", "30")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "identification", "company", "BMA/PESG")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "identification", "fax_num", "616-891-9009")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "identification", "name", @UserName)

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "identification", "phone_num", "616-891-1984")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "logging options", "save_on_exit", "0")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "logging options", "trace_level", "5")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "main", "coverdefault", "BoldComplete")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "main", "devicecount", "1")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "main", "version", "1")

IniWrite(@AppDataDir & "\FaxFinder Client Software\options.ini", "which server to use", "selected_server", "0")

EndIf

If FileExists("C:\Program Files\Multi-Tech Systems\FaxFinder Client Software\ff110client.exe") Then

Exit

Else

Run("\\bmai-svr01\Apps\Fax Finder\ffclient_1_07_00.exe")

WinActivate("Multi-Tech Systems FaxFinder Client Software")

WinWaitActive("Multi-Tech Systems FaxFinder Client Software")

Send("!n")

WinActivate("Multi-Tech Systems FaxFinder Client Software")

WinWaitActive("Multi-Tech Systems FaxFinder Client Software")

Send("{ALT}")

Send("!n")

WinActivate("Multi-Tech Systems FaxFinder Client Software")

WinWaitActive("Multi-Tech Systems FaxFinder Client Software")

Send("{ALT}")

Send("!n")

WinActivate("Multi-Tech Systems FaxFinder Client Software")

WinWaitActive("Multi-Tech Systems FaxFinder Client Software")

Send("{ALT}")

Send("!n")

WinActivate("Question")

WinWaitActive("Question")

Send("{ALT}")

Send("!y")

WinActivate("Question")

WinWaitActive("Question")

Send("{ALT}")

Send("!y")

WinKill("Multi-Tech Systems FaxFinder Client Software")

Send("{ENTER}")

WinActivate("FaxFinder Fax Client - WARNING")

WinWaitActive("FaxFinder Fax Client - WARNING")

Send("{ENTER}")

EndIf

Exit

Link to comment
Share on other sites

Hi,

maybe one of your WinWaitActive waits for a wrong titel. Try using the 3rd parameter.

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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