Jump to content

Can we make tray icon disappear during snooze?


Recommended Posts

Is it just me or since the new AI forum look, the search really doesn't work anywhere near as well as it used to! This time both my AI and google searches didn't yield results and I know there must be messages. I _really_ miss the old search function. It really was terrific <sigh>.

At any rate, I'd just like to have the icon disappear during the snooze portion of my GUI. But the no tray icon code doesn't seem to work. Wondering if there's something that I don't know in this regard.

Func Click_Snooze()
        GUISetState(@SW_HIDE)
        $input = InputBox($SnoozeBoxTITLE, "Snooze for how many minutes?", $SnoozeTimeInMins)
        $time = $input*1000*60
        Sleep($time)
        GUISetState(@SW_SHOW)
        Beep(3500, 50)
        #NoTrayIcon     ; AutoIt's icon doesn't show in systray
EndFunc     ;  End "Click_Snooze

The #NoTrayIcon above doesn't seem to do anything no matter where I place it above. I've tried before the GUISetSTate(@SW_HIDE) above and in various other locations but no good, so far.

What can be done?

Thx. :)

Link to comment
Share on other sites

#NoTrayIcon should be at the top of your script, just like #RequireAdmin and other thing that starts with a # (except comments obviously). Try TraySetState() or Opt("TrayIconHide", 1/0) instead.

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