freeman7 Posted March 14, 2007 Posted March 14, 2007 (edited) Hello! I created a double window gui. There is main window and another window which is a help window. When I close the help window from X on upper right corner, I get this error message for line 28: Array variable has incorrect number of subscripts or subscript dimension range exceeded.: Case $msg = $XIcon[2] Case $msg = ^ ERROR The only difference to my previous program is that there was only one window and it worked... Does it help if I make it a child window? How could I do it with XSkin? Any help? Code: expandcollapse popup#Region - Program settings #include <GUIConstants.au3> #include <XSkin.au3> #include <XSkinShell.au3> #NoTrayIcon opt("Trayiconhide", 1) Dim $XSkinGuiExit, $XSkinGuiinfo Dim $Myrunner, $loop #EndRegion #region - guicreate $Skin_Folder = @ScriptDir & "\Skins\XP-Shutdown" $XSkinGui = XSkinGUICreate ( "My GUI", 412,554, $Skin_Folder) $Icon_Folder = @ScriptDir & "\Skins\Default" $XIcon = XSkinIcon ($XSkinGui, 3) #endregion GUISetState() While 1 MouseOver () $msg = GUIGetMsg() Select Case $msg = $XIcon[1];Close Exit Case $msg = $XIcon[2];Minimize GUISetState(@SW_MINIMIZE, $XSkinGui) Case $msg = $XIcon[3];Help Call("_help") Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _help() $Skin_Folder = @ScriptDir & "\Skins\AzuriX" $XSkinGuiinfo = XSkinGUICreate ( "Help" , 430, 240, $Skin_Folder) $Icon_Folder = @ScriptDir & "\Skins\Default" $XIcon = XSkinIcon ($XSkinGui, 1) GUICtrlCreateLabel("Help comes to this window." , 25, 45, 380, 20) GUISetState() While 1 MouseOver () $msg = GUIGetMsg() Select Case $msg = $XIcon[1] GUIDelete($XSkinGuiinfo) $Skin_Folder = @ScriptDir & "\Skins\XP-Shutdown" exitLoop EndSelect WEnd EndFunc ;==>help Edited March 14, 2007 by freeman7 -------------------------------------------------------People keeping order at their stuff are just too lazy to search anything...Test these:Easy-to-use notepad
Valuater Posted March 14, 2007 Posted March 14, 2007 Like this... expandcollapse popup#Region - Program settings #include <GUIConstants.au3> #include <XSkin.au3> #include <XSkinShell.au3> #NoTrayIcon opt("Trayiconhide", 1) Dim $XSkinGuiExit, $XSkinGuiinfo Dim $Myrunner, $loop #EndRegion #region - guicreate $Skin_Folder = @ScriptDir & "\Skins\XP-Shutdown" $XSkinGui = XSkinGUICreate ( "My GUI", 412,554, $Skin_Folder) $Icon_Folder = @ScriptDir & "\Skins\Default" $XIcon = XSkinIcon ($XSkinGui, 3) #endregion GUISetState() While 1 MouseOver () $msg = GUIGetMsg() Select Case $msg = $XIcon[1];Close Exit Case $msg = $XIcon[2];Minimize GUISetState(@SW_MINIMIZE, $XSkinGui) Case $msg = $XIcon[3];Help Call("_help") Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _help() $Skin_Folder = @ScriptDir & "\Skins\AzuriX" $XSkinGuiinfo = XSkinGUICreate ( "Help" , 430, 240, $Skin_Folder) $Icon_Folder = @ScriptDir & "\Skins\Default" $XIcon2 = XSkinIcon ($XSkinGui, 1) GUICtrlCreateLabel("Help comes to this window." , 25, 45, 380, 20) GUISetState() While 1 MouseOver () $msg = GUIGetMsg() Select Case $msg = $XIcon2[1] GUIDelete($XSkinGuiinfo) $Skin_Folder = @ScriptDir & "\Skins\XP-Shutdown" exitLoop EndSelect WEnd EndFunc ;==>help You cant use this XIcon array twice, so i used $XIcon2 for the second one 8)
freeman7 Posted March 15, 2007 Author Posted March 15, 2007 (edited) You cant use this XIcon array twice, so i used $XIcon2 for the second one8)Ofcourse... :">Thanks! Edited March 15, 2007 by freeman7 -------------------------------------------------------People keeping order at their stuff are just too lazy to search anything...Test these:Easy-to-use notepad
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