Jump to content

Is this possible


Qslig
 Share

Recommended Posts

Do you mean the system tray?

If so the answer might have somthing to do with closing the GUI, but I don't think there is any way to work with the system tray but I might be wrong.

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Link to comment
Share on other sites

Here you go.

#include <GUIConstants.au3>

$Dummy_win = GUICreate('')

GUICreate('New GUI', 250, 250, -1, -1, -1, -1, $Dummy_win)
GUISetState()

While 1
   $msg = GUIgetMsg()
   Select
      Case $msg = $GUI_EVENT_CLOSE
         GUIDelete()
         EXIT
      Case Else
         Sleep(25)
   EndSelect
WEnd
Link to comment
Share on other sites

Holger has been working on tray icon support, but it's not in the current AutoIt version yet. (He released a version a month or two ago that worked really well.)

You could hide the window when you click minimize, but you would need to use a hotkey, such as Ctrl+Alt+R, to bring it back:

#include <GUIConstants.au3>
Break(0);prevent closing of script from tray icon....

HotKeySet("^!r", "RestoreWindow")

Global $Gui = GuiCreate("Minimize Me...")
GUISetState(@SW_SHOW)
While 1
   $msg = GUIgetMsg()
   Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $GUI_EVENT_MINIMIZE
        GUISetState(@SW_HIDE)
        TrayTip("AutoIt", "Press Ctrl+Alt+R to restore the window...", 5, 1)
   EndSelect
WEnd
EXIT

Func RestoreWindow()
    GuiSetState(@SW_SHOW)
    TrayTip("", "", 5)
EndFunc
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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...