Jump to content

XSkin.au3... Skin your GUI


Valuater
 Share

Recommended Posts

XSkin Plug-in

XSkinShell.au3

Notepad

Posted Image

Internet

Posted Image

Computer

Posted Image

XSkinShell - Example

Posted Image

XSkinShell - Example

#include <GUIConstantsEx.au3>
#include <XSkin.au3>
#include <XSkinShell.au3>

Dim $loop, $Myrunner

; folder of skin
$Skin_Folder = @ScriptDir & "\Skins\Universal"

$XSkinGui = XSkinGUICreate ( "My GUI", 400, 450, $Skin_Folder)

$Icon_Folder = @ScriptDir & "\Skins\Default"
$XIcon = XSkinIcon ($XSkinGui, 1)

$Button_1 = XSkinButton ("ReSize a Program", 130, 130, 120, 30, "CallResize") ; mouse-over color automatic
GUICtrlSetTip($Button_1, "Some programs will need to be re-sized")
$Button_2 = XSkinButton ("Run - Notepad", 130, 165, 120, 30, "CallRun") ; mouse-over color automatic
$Button_3 = XSkinButton ("Explore - Internet", 130, 200, 120, 30, "CallInternet") ; mouse-over color automatic
$Button_4 = XSkinButton ("Explore - Hard Drive", 130, 235, 120, 30, "CallHardDrive") ; mouse-over color automatic
$Button_5 = XSkinIconButton ("Exit", 130, 270, 120, 30, 240) ; Icon button - No mouse-over color

GUISetState()

While 1
    MouseOver ()
    $msg = GUIGetMsg()
    
    If $msg = $XIcon[1]Or $msg = $Button_5 Then Exit
    
    If $loop Then CheckWindow()
WEnd

Func CallResize()
    ;; XSkinReSize( $XRS_Program, $XSR_Width, $XSR_Height)
    ;; some programs may need to be resized
    XSkinReSize ( "notepad.exe", 400, 400)
EndFunc   ;==>CallResize

Func CallRun()
    ;; XSkinRun( $XR_Title, $XR_Program)
    $Myrunner = XSkinRun ("My Notepad", "notepad.exe")
    $loop = 1
EndFunc   ;==>CallRun

Func CallInternet()
    ;; XSkinExplore( $XSI_Title, $XSI_Location, $XSI_Width, $XSI_Height)
    $Myrunner = XSkinExplore ( "My Internet", "http://www.autoitscript.com/forum/index.php?showtopic=32494", 720, 600)
    $loop = 1
EndFunc   ;==>CallInternet

Func CallHardDrive()
    ;; XSkinExplore( $XSI_Title, $XSI_Location, $XSI_Width, $XSI_Height)
    $Myrunner = XSkinExplore ( "My Programs", @ScriptDir, 600, 500)
    $loop = 1
EndFunc   ;==>CallHardDrive

Func CheckWindow()
    While WinExists($Myrunner[0]) And WinExists($Myrunner[1])
        $XRM_msg = GUIGetMsg()
        If $XRM_msg = $Myrunner[2]Then ExitLoop ; exit button on parent
    WEnd
    WinClose($Myrunner[1]) ; the executed program
    GUIDelete($Myrunner[0]) ; the "parent" XSkin
    $loop = 0
EndFunc   ;==>CheckWindowoÝ÷ Ùt¤t¡zYZ»v®¶­sc²fW"ããWFöBfW"c2ã"ã"ãRó#"ó#Ò&WV&W26¶âæS0 ¢6æ6ÇVFRfÇC´uT6öç7FçG4WæS2fwC°¢6æ6ÇVFRÖöæ6P£²6æ6ÇVFRfÇCµ6¶âæS2fwC°£´÷BgV÷C´×W7DFV6Æ&Uf'2gV÷C²Â ¤gVæ26¶å&U6¦Rb33cµ%5õ&öw&ÒÂb33cµ5%õvGFÂb33cµ5%ôVvB¢Æö6Âb33cµ5BÂb33cµvæBÒÂb33cµ7EBÒFÆÅ7G'V7D7&VFRgV÷C¶çBgV÷C²Âb33cµ5väÆ7BÂb33cµ6FÆÂÂb33cµ@¢b33cµ5BÒ'Vâb33cµ%5õ&öw&ÒÂb33²b33²Â5uôDR¢Fð¢b33cµ5väÆ7BÒväÆ7B¢f÷"b33c¶ÒFòb33cµ5väÆ7E³Õ³Ð¢bb33cµ5väÆ7E²b33c¶Õ³ÒfÇC²fwC²gV÷C²gV÷C²FVà¢FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´vWEvæF÷uF&VE&ö6W74BgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµ5väÆ7E²b33c¶Õ³ÒÂgV÷C·G"gV÷C²ÂFÆÅ7G'V7DvWEG"b33cµ7EB¢bFÆÅ7G'V7DvWDFFb33cµ7EBÂÒb33cµ5BFVà¢b33cµvæBÒb33cµ5väÆ7E²b33c¶Õ³Ð¢WDÆö÷¢VæD`¢VæD`¢æW@¢6ÆVW#¢VçFÂb33cµvæBfÇC²fwC²¢b33cµ6FÆÂÒgV÷C²gV÷C°¢b33cµ7EBÒ¢bb33cµvæBfÇC²fwC²FVà¢väÖ÷fRb33cµvæBÂgV÷C²gV÷C²Â#Â#Âb33cµ5%õvGFÂb33cµ5%ôVvB¢6ÆVW¢vä6Æ÷6Rb33cµvæB¢VæD`¤VæDgVæ2³ÓÒfwCµ6¶å&U6¦P ¤gVæ26¶å'Vâb33cµ%õFFÆRÂb33cµ%õ&öw&ÒÒgV÷C²gV÷C²²Fæ·2öÆvW ¢bb33cµ%õ&öw&ÒÒgV÷C²gV÷C²FVâ&WGW&à¢Æö6Âb33cµvæBÒÂb33cµ7EBÒFÆÅ7G'V7D7&VFRgV÷C¶çBgV÷C²Âb33cµ5väÆ7BÂb33cµvå6¦RÂb33cµ6FÆÂÂb33cµBÂb33cµC"Âb33cµ%õ&WE³5ÒÂb33cµ÷&WBÂb33c¶÷7GÆRÂb33c¶÷7GÆP¢b33cµBÒ'Vâb33cµ%õ&öw&ÒÂb33²b33²Â5uôDR¢Fð¢b33cµ5väÆ7BÒväÆ7B¢f÷"b33c¶ÒFòb33cµ5väÆ7E³Õ³Ð¢bb33cµ5väÆ7E²b33c¶Õ³ÒfÇC²fwC²gV÷C²gV÷C²FVà¢FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´vWEvæF÷uF&VE&ö6W74BgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµ5väÆ7E²b33c¶Õ³ÒÂgV÷C·G"gV÷C²ÂFÆÅ7G'V7DvWEG"b33cµ7EB¢bFÆÅ7G'V7DvWDFFb33cµ7EBÂÒb33cµBFVà¢b33cµvæBÒb33cµ5väÆ7E²b33c¶Õ³Ð¢WDÆö÷¢VæD`¢VæD`¢æW@¢6ÆVW#¢VçFÂb33cµvæBfÇC²fwC²¢b33cµ6FÆÂÒgV÷C²gV÷C°¢b33cµ7EBÒ¢bb33cµvæBfÇC²fwC²FVà¢b33cµvå6¦RÒvävWE÷2b33cµvæB¢b33cµC"Ò6¶äuT7&VFRb33cµ%õFFÆRÂb33cµvå6¦U³%Ò²b33c·FÆU÷6¦R¢"Âb33cµvå6¦U³5Ò²b33c·FÆU÷6¦R¢"Âb33cµ6¶åôföÆFW"¢bfÆTW7G2b33c´6öåôföÆFW"FVâb33cµ÷&WBÒ6¶ä6öâb33cµC"¢b33c¶÷7GÆRÒFÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´vWEvæF÷tÆöærgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµC"ÂgV÷C¶çBgV÷C²ÂÓb¢FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶ÆöærgV÷C²ÂgV÷Cµ6WEvæF÷tÆöærgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµC"ÂgV÷C¶çBgV÷C²ÂÓbÂgV÷C¶ÆöærgV÷C²Â&Dõ"b33c¶÷7GÆU³ÒÂb33cµu5ô4Ä4ÄE$Tâ¢b33c¶÷7GÆRÒFÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶ÆöærgV÷C²ÂgV÷C´vWEvæF÷tÆöærgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµvæBÂgV÷C¶çBgV÷C²ÂÓb¢FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷Cµ6WE&VçBgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµvæBÂgV÷C¶væBgV÷C²Âb33cµC"¢FÆÄ6ÆÂgV÷C·W6W#3"æFÆÂgV÷C²ÂgV÷C¶ÆöærgV÷C²ÂgV÷Cµ6WEvæF÷tÆöærgV÷C²ÂgV÷C¶væBgV÷C²Âb33cµvæBÂgV÷C¶çBgV÷C²ÂÓbÂgV÷C¶ÆöærgV÷C²Â&Dõ"b33cµu5õõUÂb33cµu5ô4ÄBÂb33cµu5õd4$ÄRÂb33cµu5ô4Ä4$Ääu2¢uT6WE7FFR¢väÖ÷fRb33cµvæBÂgV÷C²gV÷C²Âb33c·FÆU÷6¦RÂb33c·FÆU÷6¦R¢vå6WE7FFRb33cµvæBÂgV÷C²gV÷C²Â5uõ4õr¢vä7FfFRb33cµvæB¢b33cµ%õ&WE³ÒÒb33cµC ¢b33cµ%õ&WE³ÒÒb33cµvæ@¢b33cµ%õ&WE³%ÒÒb33cµ÷&WE³Ð¢&WGW&âb33cµ%õ&W@¢VæD`¤VæDgVæ2³ÓÒfwCµ6¶å'Và ¤gVæ26¶äWÆ÷&Rb33cµ4õFFÆRÂb33cµ4ôÆö6FöâÂb33cµ4õvGFÂb33cµ4ôVvB¢Æö6Âb33c¶õRÂb33cµ4õ&WE³5ÒÂb33cµ4ö'WBÂb33cµ4öwVÂb33c¶õ7FfU¢b33c¶õRÒö&¤7&VFRgV÷Cµ6VÆÂäWÆ÷&W"ã"gV÷C²¢b33cµ4öwVÒ6¶äuT7&VFRb33cµ4õFFÆRÂb33cµ4õvGF²b33c·FÆU÷6¦R¢"Âb33cµ4ôVvB²b33c·FÆU÷6¦R¢"Âb33cµ6¶åôföÆFW"¢bfÆTW7G2b33c´6öåôföÆFW"FVâb33cµ4ö'WBÒ6¶ä6öâb33cµ4öwV¢b33c¶õ7FfUÒuT7G&Ä7&VFTö&¢b33c¶õRÂb33c·FÆU÷6¦RÂb33c·FÆU÷6¦RÂb33cµ4õvGFÂb33cµ4ôVvB¢b33c¶õRææfvFRb33cµ4ôÆö6Föâ¢uT6WE7FFR¢b33cµ4õ&WE³ÒÒb33cµ4õ&WE³Ð¢b33cµ4õ&WE³%ÒÒb33cµ4ö'WE³Ð¢&WGW&âb33cµ4õ&W@¤VæDgVæ2³ÓÒfwCµ6¶äWÆ÷&

... Tested 5/22/2008 Autoit Ver v3.2.12.0

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

this worked for me... changed "skin" to "skins"

BUT... the variable "$Skin_Folder".... IS REQUIRED

#include <GUIconstants.au3>
#include <Xskin.au3>

$Skin_Folder = @ScriptDir & "\Skins\DeFacto"
$Icon_Folder = @ScriptDir & "\Skins\Default"

;skin constants
;$Skin_Folder = @ScriptDir & "\Skin\DeFacto"
;$Icon_Folder = @ScriptDir & "\Skin\Default"

global $ustalosty[11], $sleep[7]

$gui_main = XSkinGuiCreate("TEST", 240, 150, $Skin_Folder)
$XIcon = XSkinIcon($gui_main, 2)

;buttons
$bt_lov = XSkinButton("HIT", 45, 55, 150, 40)

GuiSetState()

Do
    $msg = GUIGetMsg()
    if $msg = $bt_lov then XSkinMsgBox("Test! Test! Test!", "Hm...to be or not to be?")
until $msg = $XIcon[1]

8)

NEWHeader1.png

Link to comment
Share on other sites

I'm stuck again, In the demo script SkinMsgBox appears but in my script i have this error

Oct. 17, 2006

XSkin.au3 v1.3.2 *** UpDated ***

try this one ( page one )

I could not re-create the error, however i beleive i have handled the "possible" problem

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

I can't put the OK button in the middle :lmao:

like this...

#include <GUIconstants.au3>
#include <Xskin.au3>

$Skin_Folder = @ScriptDir & "\Skins\DeFacto"
$Icon_Folder = @ScriptDir & "\Skins\Default"

;skin constants
;$Skin_Folder = @ScriptDir & "\Skin\DeFacto"
;$Icon_Folder = @ScriptDir & "\Skin\Default"

global $ustalosty[11], $sleep[7]

$gui_main = XSkinGuiCreate("TEST", 240, 150, $Skin_Folder)
$XIcon = XSkinIcon($gui_main, 2)

;buttons
$bt_lov = XSkinButton("HIT", 45, 55, 150, 40)

GuiSetState()

Do
    $msg = GUIGetMsg()
    if $msg = $bt_lov then MY_XSkinMsgBox("Test! Test! Test!", "Hm...to be or not to be?")
until $msg = $XIcon[1]
    
    
Func MY_XSkinMsgBox( $MyTitle, $MyText)
    $gui_main2 = XSkinGuiCreate($MyTitle, 240, 150, $Skin_Folder)
    $XIcon2 = XSkinIcon($gui_main, 1)
    GUICtrlCreateLabel( $MyText, 40, 40, 120, 20)
    ;buttons
    $btn1 = XSkinButton("&OK", 100, 80, 50, 20)
    GuiSetState()
    Do
        $msg2 = GUIGetMsg()
        if $msg2 = $btn1 then ExitLoop
    until $msg2 = $XIcon2[1]
    GUIDelete($gui_main2)
EndFunc

however, i do notice you are NOT using the MouseOver for colors... they work best when the button is given an event...IE

$bt_lov = XSkinButton("HIT", 45, 55, 150, 40, "MY_XSkinMsgBox" )

8)

NEWHeader1.png

Link to comment
Share on other sites

All this mouseover() thing is slowing down my gui :lmao:

An i've tryed the new Xskin and it's work but with a little bug, A have a msgbox with a very long text, so, the text is placed badly in the window.

With mouseover() the event from the button begins after mouseout. Is designed so?

MouseOver() can possibly slow down the program some... but not much, I have checked MANY times for CPU usage and it is minimal

The original message box was designed for one, two or three lines of text... if yours is larger than it might appear out-of-line... but should'nt in theory

... also i showed you how you can create your own message box ... any way you want to

MouseOver() executes the function immediately, there is no lag ( you might note that the button remains the over-color until the function is complete )

not using the MouseOver()... you need to move the mouse away from the button to execute the $msg or Function because it is in a loop ( waiting to execute the function given )

8)

NEWHeader1.png

Link to comment
Share on other sites

Hello just want to know is the XSkinTabs() function supported?

Or is it still coming soon?

I am still waiting for that feature, because I have only a program which mainly consist of GuiCtrlCreateTab, and buttons.

Thanks heaps

not quite yet,,,,

it was a little more complicated than i expected, same with the XSkin dialog box

dont hold your breath, but they both should be comming some day soon

thx

8)

NEWHeader1.png

Link to comment
Share on other sites

Look at this screens, i'm getting a line on the mesagebox with some skins.

yes this is possible... the way to work with that is

#1

change the display size in the Skin.ini settings

[settings]; Setting information header

size=50 ; Set the displayed size of the all the images that make the skin

#2

Because this is a message box that YOU defined...

Change the message box size

In all cases you can be sure that once the settings are corrected, they will display correctly on all systems

8)

Edited by Valuater

NEWHeader1.png

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...