wrybread Posted October 4, 2005 Posted October 4, 2005 I'm trying to change the icon in the System Tray of the script I'm running. In other words, if a given condition is met, the icon changes to something else. Is this possible? I've searched the archives and didn't come up with anything.
Wb-FreeKill Posted October 4, 2005 Posted October 4, 2005 Strait from the help file #Include <Constants.au3> #NoTrayIcon Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown. $exititem = TrayCreateItem("Exit") TraySetState() $start = 0 While 1 $msg = TrayGetMsg() If $msg = $exititem Then ExitLoop $diff = TimerDiff($start) If $diff > 1000 Then TraySetIcon("Shell32.dll",Random(0,100,1)) $start = TimerInit() EndIF WEnd Exit
caineman Posted October 6, 2006 Posted October 6, 2006 Hi This may help you $Icon = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer") If $Icon ="fred:80" Then TraySetIcon (@ScriptDir & "\Icons\firewall.ico") Else TraySetIcon (@ScriptDir & "\Icons\freep.ico") Endif
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