K4iTO Posted May 17, 2010 Share Posted May 17, 2010 (edited) Hi all. I have a problem to solve.... I'm using Mini Pandora Radio Created By: Frostfel I have 4 redio stations to set in one program. The code is now working but when I click a station first window should go to tray or close and after closing radio gui it should pop up back... expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("Wybież stację", 460, 40, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 1000, 600) $GUI_Button_1 = GUICtrlCreateButton("Eska", 10, 1, 100, 30) $GUI_Button_2 = GUICtrlCreateButton("Wawa", 120, 1, 100, 30) $GUI_Button_3 = GUICtrlCreateButton("Radio Zet", 230, 1, 100, 30) $GUI_Button_4 = GUICtrlCreateButton("PlanetaFM", 340, 1, 100, 30) GUISetState() ;Show GUI _IENavigate ($oIE, "http://www.google.pl") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_3 $PanTask = _IECreateEmbedded() GUICreate("Radio Zet by K@iTO v.06", 508, 664) $PanGUI = GUICtrlCreateObj($PanTask, -2, -6, 1390, 1024) GUISetState() _IENavigate ($PanTask, "http://www.radiozet.pl/externals/online-player/online-player.html", 0) Case $msg = $GUI_Button_1 $PanTask = _IECreateEmbedded() GUICreate("Radio ESKA by K@iTO v.02", 260, 175) $PanGUI = GUICtrlCreateObj($PanTask, -300, -83, 1390, 1024) GUISetState() _IENavigate ($PanTask, "http://eska.pl/player", 0) Case $msg = $GUI_Button_2 $PanTask = _IECreateEmbedded() GUICreate("Radio WAWA by K@iTO v.03", 500, 480) $PanGUI = GUICtrlCreateObj($PanTask, -25, -6, 1390, 1024) GUISetState() _IENavigate ($PanTask, "http://content.eska.pl/streamplayers/wawa_fm/index.html", 0) Case $msg = $GUI_Button_4 $PanTask = _IECreateEmbedded() GUICreate("PlanetaFM by K@iTO v.03", 510, 160) $PanGUI = GUICtrlCreateObj($PanTask, -1, -276, 1390, 1024) GUISetState() _IENavigate ($PanTask, "http://katowice.planeta.fm/popup", 0) EndSelect WEnd GUIDelete() Exit Any one can help me? Edited May 17, 2010 by K4iTO Link to comment Share on other sites More sharing options...
Malkey Posted May 17, 2010 Share Posted May 17, 2010 Try this. expandcollapse popup; Mini Pandora Radio ; Created By: Frostfel #include <GUIConstants.au3> #include <IE.au3> Opt("TrayIconHide", 1) $PanTask = _IECreateEmbedded() GUICreate("Radio Zet by K@iTO v.02", 508, 664) ; MENU $zet = GUICtrlCreateButton("Radio Zet", 0, 0, 100, 20) $eska = GUICtrlCreateButton("Radio EsKA", 100, 0, 100, 20) $wawa = GUICtrlCreateButton("Radio WaWa", 200, 0, 100, 20) $plan = GUICtrlCreateButton("Radio PlanetaFM", 300, 0, 100, 20) $PanGUI = GUICtrlCreateObj($PanTask, -2, 18, 1390, 1024) GUISetState() _IENavigate($PanTask, "http://www.radiozet.pl/externals/online-player/online-player.html", 0) $trackmenu = GUICtrlCreateContextMenu() $aboutitem = GUICtrlCreateMenuItem("About", $trackmenu) ; next one creates a menu separator (line) GUICtrlCreateMenuItem("", $trackmenu) $exititem = GUICtrlCreateMenuItem("Exit", $trackmenu) _Progress() GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $exititem, -3, -1 ExitLoop Case $aboutitem MsgBox(0, "O programie", "Oto prosty program do sBuchania Radia ZET. Autor K@iTO. Wersja 0.6") Case $zet _IENavigate($PanTask, "http://www.radiozet.pl/externals/online-player/online-player.html", 0) _Progress() Case $eska _IENavigate($PanTask, "http://www.eska.pl/player&ref=eska", 0) _Progress() Case $wawa _IENavigate($PanTask, "http://content.eska.pl/streamplayers/wawa_fm/index.html#", 0) _Progress() Case $plan _IENavigate($PanTask, "http://www.planeta.fm/popup", 0) _Progress() EndSwitch WEnd Func _Progress() ; creates a progress meter with comments. ProgressOn("Radio Zet by K@iTO v.05", "Darmowy Program do sBuchania Radia", "0 %") For $i = 10 To 100 Step 10 Sleep(300) ; wait time. ProgressSet($i, $i & " %") ; set the progress meter to the variable $i. Next ProgressSet(100, "ZaBadowane", "MiBego SBuchania") ; when the loop is complete, set the progress meter to 100 percent. Sleep(1500) ; wait a half of a second. ProgressOff() ; close the progress meter. EndFunc ;==>_Progress Link to comment Share on other sites More sharing options...
K4iTO Posted May 18, 2010 Author Share Posted May 18, 2010 (edited) I have create the post Posted Yesterday, 11:18 PM then change it This post has been edited by K4iTO: Today, 12:13 AM Your anwser Posted Today, 12:42 AM and i'm realy sorry for that Hi thanks for trying... But i have change the code in Meanwhile. Your idea is nice but it don't change the size of the GUI Check my new code and maybe it will work: How to make the code in side all cointerners or How to put in to tray after choosing window and after exit childe (radio) it should pop up again ;D or Simple How to close second GUI without closing all GUI's Ok now I have some changes made first the code: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("Wybież stację", 460, 40, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 1000, 600) $GUI_Button_1 = GUICtrlCreateButton("Eska", 10, 1, 100, 30) $GUI_Button_2 = GUICtrlCreateButton("Wawa", 120, 1, 100, 30) $GUI_Button_3 = GUICtrlCreateButton("Radio Zet", 230, 1, 100, 30) $GUI_Button_4 = GUICtrlCreateButton("PlanetaFM", 340, 1, 100, 30) GUISetState() ;Show GUI _IENavigate ($oIE, "http://www.Google.com") ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_3 zet() Case $msg = $GUI_Button_1 eska() Case $msg = $GUI_Button_2 wawa() Case $msg = $GUI_Button_4 planeta() EndSelect WEnd Func planeta() $PanTask = _IECreateEmbedded() GUICreate("PlanetaFM by K@iTO v.03", 510, 160) $PanGUI = GUICtrlCreateObj($PanTask, -1, -276, 1390, 1024) GUISetState() _IENavigate ($PanTask, "http://katowice.planeta.fm/popup", 0) EndFunc Func zet() $PanTask = _IECreateEmbedded() GUICreate("Radio Zet by K@iTO v.06", 508, 664) $PanGUI = GUICtrlCreateObj($PanTask, -2, -6, 1390, 1024) GUISetState() _IENavigate ($PanTask, "http://www.radiozet.pl/externals/online-player/online-player.html", 0) EndFunc Func eska() $PanTask = _IECreateEmbedded() GUICreate("Radio ESKA by K@iTO v.02", 260, 175) $PanGUI = GUICtrlCreateObj($PanTask, -300, -83, 1390, 1024) GUISetState() _IENavigate ($PanTask, "http://eska.pl/player", 0) EndFunc Func wawa() $PanTask = _IECreateEmbedded() GUICreate("Radio WAWA by K@iTO v.03", 500, 480) $PanGUI = GUICtrlCreateObj($PanTask, -25, -6, 1390, 1024) GUISetState() _IENavigate ($PanTask, "http://content.eska.pl/streamplayers/wawa_fm/index.html", 0) EndFunc Exit NOW the main Question: HOW to close the second GUI without closing the first? Sorry for my bad english Edited May 18, 2010 by K4iTO 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