Jump to content
Sign in to follow this  
freeman7

Xskin window

Recommended Posts

freeman7

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? :whistle:

Code:

#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 by freeman7

-------------------------------------------------------People keeping order at their stuff are just too lazy to search anything...Test these:Easy-to-use notepad

Share this post


Link to post
Share on other sites
Valuater

Like this...

#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)


NEWHeader1.png

Share this post


Link to post
Share on other sites
freeman7

You cant use this XIcon array twice, so i used $XIcon2 for the second one

8)

Ofcourse... :">

Thanks!

Edited by freeman7

-------------------------------------------------------People keeping order at their stuff are just too lazy to search anything...Test these:Easy-to-use notepad

Share this post


Link to post
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
Sign in to follow this  

×