Jump to content

XSkin.au3... Skin your GUI


Valuater
 Share

Recommended Posts

Guest Beefteck

ok let me fix that and see if it will work.

Thanks so much for the help on this :whistle:

ok, well atleast it works further into the script.

ANYWAY THANK-YOU VERY MUCH FOR THIS GREAT SCRIPT AND HELP! ;)

one thing more though :P where can I find a list of colors that work with Autoit, I need GOLD. thank-you!

Edited by Beefteck
Link to comment
Share on other sites

ok let me fix that and see if it will work.

Thanks so much for the help on this ;)

ok, well atleast it works further into the script.

ANYWAY THANK-YOU VERY MUCH FOR THIS GREAT SCRIPT AND HELP! :lmao:

one thing more though :evil: where can I find a list of colors that work with Autoit, I need GOLD. thank-you!

Hi Beefteck. If you are looking for RGB codes, here is a nice place to get them... I've been using them in Autoit scripts for a while now. Just grab the Hexadecimal value and you are all set.

http://www.pitt.edu/~nisg/cis/web/cgi/rgb.html

hope this helps!

Byteme

Link to comment
Share on other sites

thanks for the color code link byteme

I have placed it in the demonstration page

8)

No problem Valuater. Your XSkin is one of the greatest things to come for AutoIt in quite a while! I always liked the way my gui's looked, but always thought they were kinda bland. Now with XSkin, anything is possible. Very nice work! ;)

Byteme

Link to comment
Share on other sites

Just an Update....

I have been working my butt-off on two plug-ins

XSkinDialog() ; for FileOpen() and FileSave()

XSkinTab()

I have found that there is an error with Microsoft regarding FileOpen and FileSave

http://www.autoitscript.com/forum/index.php?showtopic=36554

( this leads to other similar post/problems with FileOpen )

and

the XSkinTab() requires a child window getting focus... not quite fixed yet in Autoit

here is my bug report and example of the problem

http://www.autoitscript.com/forum/index.php?showtopic=36478

so, in effect, i am waiting on Microsoft ( lol ) and an Autoit beta fix

8)

NEWHeader1.png

Link to comment
Share on other sites

When making my own skin, Is there a way to change the corners? I dont want them rounded, It kinda, recks the skin.

EDIT::

Found it.

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

How do I check the state of a button?

eg:

#include <XSkin.au3>

$Skin_Folder = @ScriptDir & "\Skins\Black-Yellow"
$XSkinGui = XSkinGUICreate("", 400, 450, $Skin_Folder, 1, 0)
$INFO = XSkinButton("?", 345, 5, 20, 20)
$X = XSkinButton("", 370, 5, 20, 20)
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Select
        Case $Msg = $X
            Exit
        Case $Msg = $INFO
            XSkinMsgBoxOK("", "")
    EndSelect
WEnd

This doesnt work.

Ok, New question, How can I have it able to drag the window?

Usually, you do it by clicking/draging the toolbar, But its not there anymore.

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

Here ya go, I needed the XSkinInputBox() to have the password parameter, So I did just that.

XSkinInputBox()

Func XSkinInputBox($IBTitle, $IBText, $IBDefault= "", $Pass = 0)
    Local $IBinput1 = XSkinMsgBox($IBTitle, $IBText, $IBDefault, 2, $Pass)
    Return $IBinput1
EndFunc   ;==>XSkinInputBox
oÝ÷ ÙµÒ)̲hÇöܡף®¶­s`¤gVæ26¶ä×6t&÷b33c´Ô%FFÆRÂb33c´Ô%FWBÂb33c´$FVfVÇBÒgV÷C²gV÷C²Âb33c´$æ÷FgÒgV÷C²gV÷C²Âb33cµ72Ò Æö6Âb33cµ5ö×6p bb33c´Ô%FFÆRÒgV÷C²gV÷C²÷"b33c´Ô%FWBÒgV÷C²gV÷C²FVâ&WGW&à Æö6Âb33c´Ô'vGFÂb33c´Ô$VvBÂb33c´Ô$æfòÂb33c´Ô$ÒÂb33cµ5öÆ&VÂÂb33c´$çW@ b33c´Ô$æfòÒ7G&æu7ÆBb33c´Ô%FWBÂ5$Äb b33c´Ô'vGFÒ7G&ætÆVâb33c´Ô$æfõ³Ò b33c´Ô$VvBÒb33c´Ô$æfõ³Ò¢R²s f÷"b33c´Ô&Ò"Fòb33c´Ô$æfõ³Ð b7G&ætÆVâb33c´Ô$æfõ²b33c´Ô&ÒfwC²b33c´Ô'vGFFVâb33c´Ô'vGFÒ7G&ætÆVâb33c´Ô$æfõ²b33c´Ô&Ò æW@ b7G&ætÆVâb33c´Ô%FFÆRfwC²b33c´Ô'vGFFVâb33c´Ô'vGFÒ7G&ætÆVâb33c´Ô%FFÆR b33c´Ô'vGFÒb33c´Ô'vGF¢BãR²b33c·FÆU÷6¦R¢"²SP b33c´Ô$VvBÒb33c´Ô$VvB²b33c·FÆU÷6¦R¢" bb33c´$æ÷FgÒ"FVâb33c´Ô$VvBÒb33c´Ô$VvB²3 bb33c´Ô'vGFfÇC²#FVâb33c´Ô'vGFÒ# bb33c´$æ÷FgÒ2FVâb33c´Ô$ÒC &TFÒb33cµ4´&÷õµT&÷VæBb33cµ4´&÷ò²Ð b33cµ5õDÔ"ÒT&÷VæBb33cµ4´&÷òÒ b33cµ4´&÷õ²b33cµ5õDÔ%ÒÒ6¶äuT7&VFRb33c´Ô%FFÆRÂb33c´Ô'vGFÂb33c´Ô$VvBÒb33c´Ô$Âb33cµ6¶åôföÆFW"Âb33c´vÆö&ÄVFW"Âb33c´vÆö&Ä6÷&æW'2 f÷"b33c´Ô&ÂÒFòb33c´Ô$æfõ³Ð b33cµ5öÆ&VÂÒuT7G&Ä7&VFTÆ&VÂb33c´Ô$æfõ²b33c´Ô&ÅÒÂb33c·FÆU÷6¦R²#Âb33c·FÆU÷6¦R²R¢b33c´Ô& uT7G&Å6WD6öÆ÷"ÓÂb33c¶fçEö6öÆ÷" æW@ bb33c´$æ÷FgÒ2FVà väÖ÷fRb33cµ4´&÷õ²b33cµ5õDÔ%ÒÂgV÷C²gV÷C²ÂFW6·F÷vGFÒb33c´Ô'vGFÒÂFW6·F÷VvBÒb33c´Ô$VvB vå6WDöåF÷b33cµ4´&÷õ²b33cµ5õDÔ%ÒÂgV÷C²gV÷C²Â FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµ4´&÷õ²b33cµ5õDÔ%ÒÂgV÷C¶çBgV÷C²Â3ÂgV÷C¶ÆöærgV÷C²ÂC·6ÆFRÖâg&öÒ&÷GFöÐ 6ÆVW7G&ætÆVâb33c´Ô%FWB¢S² FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´æÖFUvæF÷rgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµ4´&÷õ²b33cµ5õDÔ%ÒÂgV÷C¶çBgV÷C²Â#ÂgV÷C¶ÆöærgV÷C²Â¶fFRÖ÷W@ uTFVÆWFRb33cµ4´&÷õ²b33cµ5õDÔ%Ò b33cµ4´&÷õ²b33cµ5õDÔ%ÒÒgV÷C²gV÷C° &WGW&â VæD` bb33cµ72ÒFVà bb33c´$æ÷FgÒ"FVâb33c´$çWBÒuT7G&Ä7&VFTçWBb33c´$FVfVÇBÂb33c·FÆU÷6¦R²#Âb33c´Ô$VvBÒb33c·FÆU÷6¦R²sÂb33c´Ô'vGFÒb33c·FÆU÷6¦R¢"²CÂ#Âb33c´U5õ55tõ$B VÇ6Tbb33cµ72ÒFVà bb33c´$æ÷FgÒ"FVâb33c´$çWBÒuT7G&Ä7&VFTçWBb33c´$FVfVÇBÂb33c·FÆU÷6¦R²#Âb33c´Ô$VvBÒb33c·FÆU÷6¦R²sÂb33c´Ô'vGFÒb33c·FÆU÷6¦R¢"²CÂ# VæD` bb33c´$æ÷FgÒBFVà 6¶ä'WGFöâgV÷C²f×´ô²gV÷C²Âb33c´Ô'vGFò"Ò3RÂb33c´Ô$VvBÒb33c·FÆU÷6¦R²CÂsÂ#RÂgV÷Cµ6¶äÔ$gV÷C² VÇ6P 6¶ä'WGFöâgV÷C²f×´ô²gV÷C²Âb33c´Ô'vGFòRÂb33c´Ô$VvBÒb33c·FÆU÷6¦R²CÂsÂ#RÂgV÷Cµ6¶äÔ$gV÷C² 6¶ä'WGFöâgV÷C²f×´4ä4TÂgV÷C²Âb33c´Ô'vGFòR¢"ãÂb33c´Ô$VvBÒb33c·FÆU÷6¦R²CÂsÂ#RÂgV÷Cµ6¶äÔ$"gV÷C² VæD` uT6WE7FFR vå6WDöåF÷b33cµ4´&÷õ²b33cµ5õDÔ%ÒÂgV÷C²gV÷C²Â FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´ÖW76vT&VWgV÷C²ÂgV÷C¶çBgV÷C²ÂCCCCCCCB vÆR f÷"b33cµ5÷ÒFò  b33cµ5ö×6rÒuTvWD7W'6÷$æfòb33cµ4´&÷õ²b33cµ5õDÔ%Ò b4'&b33cµ5ö×6ræBb33cµ5ö×6u³EÒÓÒb33c´7G&ÄDÔ²b33cµ5÷ÕFVà uT7G&Å6WD&´6öÆ÷"b33c´7G&ÄDÔ²b33cµ5÷ÒÂb33c¶÷fW%ö6öÆ÷" vÆR4'&b33cµ5ö×6ræBb33cµ5ö×6u³EÒÓÒb33c´7G&ÄDÔ²b33cµ5÷Ð b33cµ5ö×6rÒuTvWD7W'6÷$æfòb33cµ4´&÷õ²b33cµ5õDÔ%Ò b4'&b33cµ5ö×6ræBb33cµ5ö×6u³%ÒÒgV÷C³gV÷C²FVà uT7G&Å6WE7GÆRb33c´7G&ÄDÔ%²b33cµ5÷ÒÂb33cµ55ôUD4TDe$ÔR 6ÆVW bb33c´$æ÷FgÒ"æBb33cµ5÷ÒFVâb33cµ5÷ÒuT7G&Å&VBb33c´$çWB uTFVÆWFRb33cµ4´&÷õ²b33cµ5õDÔ%Ò b33cµ4´&÷õ²b33cµ5õDÔ%ÒÒgV÷C²gV÷C° &WGW&âb33cµ5÷ VæD` 6ÆVW tVæ@ uT7G&Å6WD&´6öÆ÷"b33c´7G&ÄDÔ²b33cµ5÷ÒÂb33c¶'Fåö6öÆ÷" WDÆö÷ VæD` æW@ 6ÆVW tVæ@¤VæDgVæ2³ÓÒfwCµ6¶ä×6t&÷
Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

I have been playing with this a bit and it is interesting. I thank others also for their nice skins. However the advanced demo unless it has been updated in the last few days does not properly do rounded corners as the xkin udf itself seems to have changed and no longer does 0 and 1 for rounded corners. So I have fixed that here. Also it was not loading the tray box because the parameters were not being passed to run the function so I have fixed that also.

Here is the corrected one.

;===============================================================================
; The following is required
;===============================================================================

#include <XSkin.au3>

; required, your skin folder location
$Skin_Folder = FileReadLine(@ScriptDir & "\Skins\Default.txt", 1)
If Not FileExists($Skin_Folder) Then $Skin_Folder = FileSelectFolder("Skin Folders", @ScriptDir & "\Skins", 2)

; option, automatic mouse-over color for "your" controls use $XSkinID[ ]
; see Autoit Limits in help for GUICtrlSetBkColor()
Dim $XSkinID[6]; the amount of controls you want "mouse overed" +1, see example below

; required, set the GUI Width, Height and Title
$guiWidth = 400
$guiHeight = 450
$guiTitle = "XSkin"
$guiHeader = 1; Title bar,  -1 = show with Max/Min/Close, 0 = show title only, 1 = no show ( optional, default is no show )
$guiCorners = 25; 0 = no rounded corners ( optional, default is rounded )

; required, create the XSkin GUI
$XSkinGui = XSkinGUICreate ($guiTitle, $guiWidth, $guiHeight, $Skin_Folder, $guiHeader, $guiCorners)
; or $XSkinGui = XSkinGUICreate( $guiTitle, $guiWidth, $guiHeight, $Skin_Folder); uses defaults

; option, create Title Bar Icons - returns array[]
; 1 = Exit only, 2 = Mnimize/Exit, 3 = Help/Minimize/Exit
$Icon_Folder = @ScriptDir & "\Skins\Default"
$XIcon = XSkinIcon ($XSkinGui, 2)
; $XIcon[1] = Exit, $XIcon[2] = as above

; option, in while loop - if you want mouse over control colors and/or Mouseover GUI options below
; Mouseover()

; Mouseover() options default = no GUI action
; Mouseover(1) = Fade Active GUI for non use
; Mouseover(2) = Slide Active GUI to top of Screen for non-use
; You may add the numbers above, example = Mouseover(1 + 2)

; option, icon button with text - no color
; XSkinIconButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $BIconNum = 0, $BIDLL = "shell32.dll")

; option, you can use the following theme colors
; $over_color, $btn_color, $bkg_color, $fnt_color

; option, for colored controls use the following.... or you can use autoit commands
; XSkinButton($Btext, $Bleft, $Btop, $Bwidth, $Bheight, $event_function = "")
; XSkinMsgBox($MBTitle, $MBText)
; XSkinInputBox($IBTitle, $IBText, $IBDefault = "")
; XSkinProgress($Pleft, $Ptop, $Pwidth, $Pheight)
; XSkinTrayBox($TBTitle, $TBText)

;===============================================================================
; Now.... you are on your own
;===============================================================================

#include <GUIConstants.au3>
#Include <File.au3>

Local $F = 0, $G = 0

; just a quck example here
$Tab1 = GUICtrlCreateTab(90, 75, 200, 60)
GUICtrlCreateTabItem("Super Skin")
$XSkinID[1] = GUICtrlCreateLabel("XSkinTabs()... Comming soon", 110, 110, 152, 17); mouse-over color
GUICtrlCreateTabItem("Power Skin")
GUICtrlCreateLabel("Inside Tab 2", 110, 110, 102, 17)
GUICtrlCreateTabItem("XSkin !")
GUICtrlCreateLabel("Inside Tab 3", 110, 110, 102, 17)
GUICtrlCreateTabItem("")

;$Group1 = GuiCtrlCreateGroup("Example", 60, 55, 270, 325); No mouse-over color
GUICtrlSetColor(-1, $fnt_color); using themes color
$Progress1 = XSkinProgress (90, 140, 200, 20); mouse-over color automatic
GUICtrlSetData($Progress1, 50)
$XSkinID[2] = GUICtrlCreateRadio("GUI Slide", 80, 170, 70, 20); mouse-over color
$XSkinID[3] = GUICtrlCreateRadio("GUI Stay", 160, 170, 70, 20); mouse-over color
$XSkinID[4] = GUICtrlCreateCheckbox("GUI Fade", 240, 170, 70, 20); mouse-over color
$Slider1 = GUICtrlCreateSlider(90, 200, 200, 20)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetData($Slider1, 50)
$XSkinID[5] = GUICtrlCreateList("", 80, 230, 100, 110); mouse-over color
GUICtrlSetState($Tab1, $GUI_ONTOP)

$Button_1 = XSkinButton ("Load Skin", 210, 230, 90, 30, "Skinner"); mouse-over color automatic
GUICtrlSetTip($Button_1, "Select a Skin")
$Button_2 = XSkinButton ("XSkin MsgBox", 210, 265, 90, 30, "CallMsg"); mouse-over color automatic
$Button_3 = XSkinButton ("XSkin InputBox", 210, 300, 90, 30, "CallInput"); mouse-over color automatic
$Button_4 = XSkinButton ("XSkin TrayBox", 210, 335, 90, 30, "CallTray"); no event; mouse-over color automatic

$Button_5 = XSkinIconButton ("Exit", 85, 335, 90, 30, 240); Icon button - No mouse-over color
GUISetState()


$FileList = _FileListToArray(@ScriptDir & "\Skins")
If (Not IsArray($FileList)) Or (@error = 1) Then
    MsgBox(0, "", "No Files\Folders Found.", 5)
Else
    For $x = 1 To UBound($FileList) - 1
        If StringInStr($FileList[$x], "default") Then ContinueLoop
        $result = StringInStr($FileList[$x], "\", 1, -1)
        $final = StringTrimRight($FileList[$x], $result)
        GUICtrlSetData($XSkinID[5], $final, 1)
    Next
EndIf

While 1
    Mouseover ($F + $G); Mouseover option plus GUI option 1 + 2
    $msg = GUIGetMsg()
    Select
       ;Case $msg = $Button_4
       ;    CallTray()
           
        Case $msg = $Slider1
            GUICtrlSetData($Progress1, GUICtrlRead($Slider1))
           
        Case $msg = $XSkinID[2]Or $msg = $XSkinID[3]
            If GUICtrlRead($XSkinID[2]) = $GUI_CHECKED Then $G = 2
            If GUICtrlRead($XSkinID[3]) = $GUI_CHECKED Then $G = 0
           
        Case $msg = $XSkinID[4]
            If GUICtrlRead($XSkinID[4]) = $GUI_CHECKED Then
                $F = 1
            Else
                $F = 0
            EndIf
           
        Case $msg = $XIcon[1] Or $msg = $Button_5
            Exit
           
        Case $msg = $XIcon[2]
            GUISetState(@SW_MINIMIZE)
           
           ;Case $msg = $XIcon[3]
           ;    MsgBox(64,"Test","Help",1)
    EndSelect
WEnd

Func Skinner()
    $Skin = GUICtrlRead($XSkinID[5])
    If $Skin = "" Then Return
    FileDelete(@ScriptDir & "\Skins\Default.txt")
    FileWrite(@ScriptDir & "\Skins\Default.txt", @ScriptDir & "\Skins\" & $Skin)
    Run( FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath))
    Exit
EndFunc  ;==>Skinner

Func CallTray()
   ;; FORMAT = XSkinTrayBox($TBTitle, $TBText)
   ;; One Line of Text Only!
    XSkinTrayBox ("XSkin", "Sample XSkin Tray Box Message ")
EndFunc  ;==>CallTray

Func CallMsg()
   ;; FORMAT = XSkinMsgBox($MBTitle, $MBText)
   ;; Use @CRLF for multiple lines of Text
    $ret = XSkinMsgBox ("XSkin", "This is a sample" & @CRLF & "of an XSkin Message Box ( use '@CRLF' for multi-lines )  " & @CRLF & " Thanks ...Valuater   ")
    If $ret = 1 Then MsgBox(64, "XSkin", "the Message Box worked... Great!!!    ", 3)
EndFunc  ;==>CallMsg

Func CallInput()
   ;; FORMAT = XSkinInputBox($IBTitle, $IBText, $IBDefault = "")
   ;; you can use @crlf for additional lines ( $IBText only )
    $iret = XSkinInputBox ("Xskin", "Please type in your name", "Your Name goes here")
    If $iret <> 2 Then MsgBox(64, "XSkin Input Test", $iret)
EndFunc  ;==>CallInput

Func Exiter()
    GUIDelete($XSkinGui)
    Exit
EndFunc  ;==>Exiter

;===============================================================================
; The end
;===============================================================================

Last but not least. The traybox does not appear to work properly for some skins I have looked into but did not have enough time yet to figure out the issue. It is noticable with the blue-metal, dark red, and universal themes for sure and most likely others. Not all of them are effected though.

Also a few other themes don't seem to be rendering correctly unless they are intended to look that way. Blue -line is an example of this.

Thank you.

Link to comment
Share on other sites

Ok, New question, How can I have it able to drag the window?

Usually, you do it by clicking/draging the toolbar, But its not there anymore.

i noticed that with the XSkin.au3 included in your XSkinCommandPromt() does not allow the dragging of the GUI, however if i use the orginal XSkin.au3... it works

i noticed a 1 line difference... and the problem is here

your XSkin code ( about line 121 )

For $XS_i = 0 To (Ceiling($XS_width / $tile_size) - 3)
        GUICtrlCreatePic($elements[1], ($tile_size * ($XS_i + 1)), 0, $tile_size, $tile_size, BitOR($SS_NOTIFY, $WS_CLIPSIBLINGS), $GUI_WS_EX_PARENTDRAG )
        GUICtrlSetState(-1, $GUI_DISABLE);;
        If $XS_i > ((Ceiling($XS_width / $tile_size) - 3) / 3) * 2 Then GUICtrlSetState(-1, $GUI_DISABLE)
        GUICtrlCreatePic($elements[6], ($tile_size * ($XS_i + 1)) , ($XS_height - $tile_size), $tile_size, $tile_size, $WS_CLIPSIBLINGS)
        GUICtrlSetState(-1, $GUI_DISABLE)
    Next
oÝ÷ Øêâ)Út¤w(u殶­s` ¤f÷"b33cµ5öÒFò6VÆærb33cµ5÷vGFòb33c·FÆU÷6¦RÒ2¢uT7G&Ä7&VFU2b33c¶VÆVÖVçG5³ÒÂb33c·FÆU÷6¦R¢b33cµ5ö²ÂÂb33c·FÆU÷6¦RÂb33c·FÆU÷6¦RÂ&Dõ"b33cµ55ôäõDeÂb33cµu5ô4Ä4$Ääu2Âb33c´uTõu5ôUõ$TåDE$r¢bb33cµ5öfwC²6VÆærb33cµ5÷vGFòb33c·FÆU÷6¦RÒ2ò2¢"FVâuT7G&Å6WE7FFRÓÂb33c´uTôD4$ÄR¢uT7G&Ä7&VFU2b33c¶VÆVÖVçG5³eÒÂb33c·FÆU÷6¦R¢b33cµ5ö²Âb33cµ5öVvBÒb33c·FÆU÷6¦RÂb33c·FÆU÷6¦RÂb33c·FÆU÷6¦RÂb33cµu5ô4Ä4$Ääu2¢uT7G&Å6WE7FFRÓÂb33c´uTôD4$ÄR¢æW@

the line with

GUICtrlSetState(-1, $GUI_DISABLE);;

seems to be the problem

8)

will look at the other info asap

NEWHeader1.png

Link to comment
Share on other sites

That would make sense, I remember why I did that, The reason was, My skin was covering some of my input boxes and buttons, so I wanted to disable the skin, since it was just images. I guess it disabled the drag feature too.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...