monte Posted October 15, 2007 Posted October 15, 2007 Hello, I'm having trouble flashing the tray icon during a custom function. The problem is that I can't get the icon to STOP flashing. Any help would be greatly appreciated, thanks. expandcollapse popup#include <IE.au3> #Include <Constants.au3> #NoTrayIcon ;;;;;;;;; ;hotkeys ;;;;;;;;; HotKeySet("^#b", "cmd") ;cmd prompt ;;;;;; ;tray ;;;;;; Opt("TrayMenuMode",1) $cmd = TrayCreateItem("CMD - Ctrl Win B") TrayCreateItem("") $exititem = TrayCreateItem("Exit") TraySetState() TraySetToolTip("Hotkeys") While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $exititem ExitLoop Case $msg = $cmd cmd() EndSelect WEnd ;;;;;; ;CMD ;;;;;; func cmd() msgbox (0, "Hotkeys", "flashing the system tray icon") TraySetState(4) msgbox(0, "Hotkeys", "Running cmd.exe and blah, blah, blah") Run(@ComSpec & " /k color 02&prompt #&cls" & @cr) ; other code goes here... sleep (5000) msgbox(0, "Hotkeys", "stopping the flashing system tray icon") TraySetState() ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ;I've also tried TraySetState(16) AND TraySetState(8) at this point -- NO LUCK ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; endfunc
monte Posted October 15, 2007 Author Posted October 15, 2007 But... I used TraySetState(8) and it worked traysetstate(8) is working for me now....darn those gremlins!thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now