Update 2.0: Added minimize to tray and exit from tray
Update 2.1: Changed the way the GUI gets msg
#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=pandora.ico #AutoIt3Wrapper_outfile=Pandora.exe #AutoIt3Wrapper_Res_Description=Mini Pandora Radio #AutoIt3Wrapper_Res_Fileversion=2.0.0.0 #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Icon_Add=..\favicon.ico ; Mini Pandora Radio ; Created By: Frostfel #include <GUIConstants.au3> #Include <Constants.au3> #include <IE.au3> Opt("TrayMenuMode", 1) Opt("TrayOnEventMode", 1) Opt("GUIOnEventMode", 1) Opt("WinTitleMatchMode", 3) TraySetToolTip("Pandora Radio") TraySetState(2) $PanTask = _IECreateEmbedded() $Pandora = GUICreate("Pandora Radio", 608, 242) $PanGUI = GUICtrlCreateObj($PanTask, -62, -136, 1024, 1024) GUISetState(@SW_SHOW, $Pandora) _IENavigate ($PanTask, "http://www.pandora.com", 0) $TrayMenu_Exit = TrayCreateItem("Exit") TraySetClick(8) Func Tray_Exit() Exit EndFunc Func Tray_Restore() GUISetState(@SW_SHOW, $Pandora) TraySetState(2) GUISetState(@SW_RESTORE, $Pandora) EndFunc Func GUI_Exit() Exit EndFunc Func GUI_Hide() GUISetState(@SW_HIDE, $Pandora) TraySetState(1) EndFunc TrayItemSetOnEvent($TrayMenu_Exit, "Tray_Exit") TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "Tray_Restore") GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Exit") GUISetOnEvent($GUI_EVENT_MINIMIZE, "GUI_Hide") While 1 Sleep(1000000) WEnd
This post has been edited by frostfel: 09 October 2007 - 09:04 PM

Sign In
Register
Help

MultiQuote