Jump to content

Script hangs in system tray need help


Recommended Posts

I created a script and compiled it to an .exe. The script runs and installs the application, but half the time it installs and then leaves an icon in the system tray saying the script name and that it is paused. I have to right click and select exit for it to be done.

I really need it to complete, so I can install other applications after it.

Any help would be much appreciated.

-----------------------------------------------------

Run("setup.exe")

WinWaitActive("RSA SecurID Software Token Setup")

Send("{ENTER}")

WinWaitActive("RSA SecurID Software Token Setup License Agreement")

Send("{ENTER}")

WinWaitActive("RSA SecurID Software Token Setup Folder")

Send("{ENTER}")

WinWait("RSA SecurID Software Token Setup", "RSA SecurID Software Token Setup succeeded!")

Send("{ENTER}")

Exit

-----------------------------------------------------

Link to comment
Share on other sites

#noTrayIcon
Run("setup.exe")

WinWaitActive("RSA SecurID Software Token Setup")
Send("{ENTER}")

WinWaitActive("RSA SecurID Software Token Setup License Agreement")
Send("{ENTER}")

WinWaitActive("RSA SecurID Software Token Setup Folder")
Send("{ENTER}")

WinWait("RSA SecurID Software Token Setup", "RSA SecurID Software Token Setup succeeded!")
Send("{ENTER}")

Exit

?

EDIT: Should of stated this originally: the #noTrayIcon (at the very top) would get rid of the icon from the very beginning.

However, like PsaltyDS said, it might be getting stuck at one of the WinWait commands...

Edited by Piano_Man
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

It just runs a setup and applies enter so I can have it installed silently. The application does not support a silent install normaly.

Problem is where it completes and then seems to pause.

Anything more than ? would be helpful.

Link to comment
Share on other sites

It just runs a setup and applies enter so I can have it installed silently. The application does not support a silent install normaly.

Problem is where it completes and then seems to pause.

Anything more than ? would be helpful.

Put this at the top of the script:

Opt("TrayAutoPause", 0)
Opt("TrayIconDebug", 1)

When you put your mouse over the tray icon, it should tell you by line number which of the WinWait's is stuck.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

WinWaitActive is know that sometimes gets stuck when the window title/window text is quite long.

Solution: put Opt("WinTitleMatchMode", 2) on top of your script and try to shorten the title to a minimum necessary.

#noTrayIcon
Opt("WinTitleMatchMode", 2)
Run("setup.exe")

WinWaitActive("RSA SecurID")
Send("{ENTER}")

WinWaitActive("License Agreement")
Send("{ENTER}")

WinWaitActive("Setup Folder")
Send("{ENTER}")

WinWait("RSA SecurID", "Setup succeeded!")
Send("{ENTER}")

Exit

You can change the titles above as you wish as long as what you choose is significant for that window. Also add what PsaltyDS suggested.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

Put this at the top of the script:

Opt("TrayAutoPause", 0)
Opt("TrayIconDebug", 1)

When you put your mouse over the tray icon, it should tell you by line number which of the WinWait's is stuck.

:)

Thanks for the tips. The Debug code let me see where the error was.

Crash99

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