godsstigma Posted January 21, 2009 Share Posted January 21, 2009 Ok, so I am probably going about this completely wrong, but I have no clue what to try now Please help: I found a sample script that integrates IE into a GUI and runs www.pandora.com and I was trying to create a tray menu that would allow me to hide and show the GUI (simple right???). Well I can not get the menu controls to work at all. here is the code #include <GUIConstants.au3> #include <IE.au3> Opt("TrayMenuMode", 1) Opt("TrayMenuMode", 1) $PanTask = _IECreateEmbedded() $Form1 = GUICreate("Pandora Radio", 608, 450) $PanGUI = GUICtrlCreateObj($PanTask, -62, -136, 1024, 1024) TraySetClick("9") $Menu_exit = TrayCreateItem("Exit") GUICtrlSetOnEvent($Menu_exit, "ExitGUI") $Menu_Show = TrayCreateItem("Show") GUICtrlSetOnEvent($Menu_Show, "ShowGUI") $Menu_Hide = TrayCreateItem("Hide") GUICtrlSetOnEvent($Menu_Hide, "HideGUI") GUISetState(@SW_SHOW, $Form1) _IENavigate ($PanTask, "http://www.pandora.com", 0) While 1 sleep(10) WEnd Func exitGUI() Exit EndFunc Func showGUI() GUISetState(@SW_SHOW, $Form1) EndFunc Func HideGUI() GUISetState(@SW_HIDE, $Form1) EndFunc Any help would be much appreciated. Thanks Link to comment Share on other sites More sharing options...
this Posted January 21, 2009 Share Posted January 21, 2009 Try adding Opt("TrayOnEventMode",1) UDFsWinSineInOutResize () - Resize a window smoothly based on a sine curve. Link to comment Share on other sites More sharing options...
smashly Posted January 21, 2009 Share Posted January 21, 2009 Also use TrayItemSetOnEvent() instead of GUICtrlSetOnEvent() Link to comment Share on other sites More sharing options...
Valuater Posted January 21, 2009 Share Posted January 21, 2009 All those peices still wouldn't have worked... this does expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> Opt("GUIOnEventMode", 1) Opt("TrayMenuMode", 1) Opt("TrayOnEventMode", 1) $PanTask = _IECreateEmbedded() $Form1 = GUICreate("Pandora Radio", 608, 450) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitGUI", $Form1) $PanGUI = GUICtrlCreateObj($PanTask, -62, -136, 1024, 1024) GUISetState(@SW_SHOW, $Form1) TraySetClick("9") $Menu_exit = TrayCreateItem("Exit") TrayItemSetOnEvent($Menu_exit, "ExitGUI") $Menu_Show = TrayCreateItem("Show") TrayItemSetOnEvent($Menu_Show, "ShowGUI") $Menu_Hide = TrayCreateItem("Hide") TrayItemSetOnEvent($Menu_Hide, "HideGUI") _IENavigate($PanTask, "http://www.pandora.com", 0) While 1 Sleep(10) WEnd Func exitGUI() Exit EndFunc ;==>exitGUI Func showGUI() GUISetState(@SW_SHOW, $Form1) EndFunc ;==>showGUI Func HideGUI() GUISetState(@SW_HIDE, $Form1) EndFunc ;==>HideGUI 8) Link to comment Share on other sites More sharing options...
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