Sign in to follow this  
Followers 0
SinSoul

Ezskin and 2nd Gui

4 posts in this topic

Hello. I'm still a starter in AutoIt. And though I've browser through a lot of information, but I couldn't find anything about my problem. My brain is almost toasted, my last hope lies with you guys. So here's my problem. I'm using ezSkin, the skin has it's embed close and minimize buttons. My program consist of several gui windows, the main one and 2 dynamic "More" and "Help". By dynamic I mean that they are supposed to be closed and opened at anytime. By pressing "More" there supposed to open another gui containing some checkboxes. By pressing "Help" - should open gui containing just some info. First question - how do I make a close button in new gui's for them to close? Second question - How do I pass data from gui "More" to main? Since it has script to save data to txt file. Forgive me, if I'm not making myself clear. I got 3rd world war right now in my head. In any case, I'd appreciate any help. Thank you in advance.

#Include <WinAPI.au3>
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <EzSkin.au3>
Opt("TrayIconHide", 1)
$EZGUI = EZSKINGUICREATE("gui", 400, 400)
GUICtrlCreateLabel( "gui", 100, 20 )
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$about = EZSKINBUTTON("Help", 188, 320, 73, 28, $WS_GROUP)
GUISetState(@SW_SHOW)
While 1
    EZSKINOVER()
    $MSG = GUIGetMsg()
    Switch $msg
        Case $EZICON[1]
            GUIDelete($help)
        Case $EZICON[2]
            GUISetState(@SW_MINIMIZE, $EZGUI)
        Case $about
                        ;Create new GUI
            $help = EZSKINGUICREATE("Help", 400, 400)
            $EZICON = EZSKINICON($help)
            GUICtrlCreateLabel( "Help", 100, 20 )
            GUICtrlSetColor(-1, 0xffffff)
            GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
            ;tried to declare a close button, but when I add while statement here, pc freezes
            GUISetState(@SW_SHOW)
    EndSwitch
WEnd
#endregion

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

This works...

#Region ; Code generated by EzSkin_1-2-3, Created by Valuater
; For personal use only, All Rights Reserved
; Author of this code: Valuater
; Thank you big_daddy and Joscpe

#include <WinAPI.au3>
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <EzSkin.au3>

Opt("TrayIconHide", 1)
$EZGUI = EzSkinGUICreate("gui", 300, 400)
$Label = GUICtrlCreateLabel("gui", 100, 70, 200)
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$about = EZSKINBUTTON("Help", 188, 320, 73, 28, $WS_GROUP)
$exit = EZSKINBUTTON("Exit", 100, 320, 73, 28, $WS_GROUP)
GUISetState(@SW_SHOW)

;~ ;Create new GUI
$help = EZSKINGUICREATE("Help", 300, 400)
$EZICON = EZSKINICON($help)
$Input = GUICtrlCreateInput("Type New GUI Label", 70, 170, 150, 25)
GUICtrlCreateLabel("Help", 100, 70)
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;tried to declare a close button, but when I add while statement here, pc freezes
GUISetState(@SW_HIDE)


While 1
    EZSKINOVER()
    $MSG = GUIGetMsg()
    Switch $MSG
        Case $EZICON[1]
            GUICtrlSetData($Label, GUICtrlRead($Input))
            GUISetState(@SW_HIDE, $help)
        Case $EZICON[2]
            GUISetState(@SW_MINIMIZE, $EZGUI)
        Case $about
            GUISetState(@SW_SHOW, $help)
        Case $exit
            Exit

    EndSwitch
WEnd

#EndRegion ; Code generated by EzSkin_1-2-3, Created by Valuater

But, it needs a lot more effort

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Great script, thank you very much x) helped me to solve the problem, it also helped me with other creativity blocks =D I'd press worship button near your profile, but it doesn't have one =(

Edited by SinSoul

Share this post


Link to post
Share on other sites

Thanks for the kudos!!! :huh2:

Glad I could help

8)


NEWHeader1.png

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  
Followers 0