Sign in to follow this  
Followers 0
ScriptUSER

Xskin not working with this script ?

3 posts in this topic

#include <GUIConstants.au3>
#include <XSkin.au3>

Opt("GUIOnEventMode", 1)
$Skin_Folder = @ScriptDir & "\Skins\Universal"
$Icon_Folder = @ScriptDir & "\dat"

$XSkinGui = XSkinGUICreate( "Marquee", 200, 100, $Skin_Folder)
GUISetOnEvent($GUI_EVENT_CLOSE,"GUI_CLOSE")

$XIcon = XSkinIcon($XSkinGui, 3)

$GUI_Progress = XSkinProgress(50, 30, 100, 20)
GUICtrlSetColor(-1, 0x00FF00)
                     GUICtrlSetBkColor(-1, 0x000073)


$GUI_Button_Start = GUICtrlCreateButton("Start", 40, 50)
GUICtrlSetOnEvent(-1, "Progress_Start")


$GUI_Combo = GUICtrlCreateCombo("", 78, 52, 50)
GUICtrlSetData(-1,"1|10|50|100|300|500") 
GUICtrlSetOnEvent(-1, "Progress_Time")


$GUI_Button_Stop = GUICtrlCreateButton("Stop", 135, 50)
GUICtrlSetOnEvent(-1, "Progress_Stop")
GUISetState()

While 1
    Sleep(100)
WEnd

Func Progress_Start()
    _GUICtrlProgressSetMarquee($GUI_Progress)
EndFunc;==>Progress_Start

Func Progress_Stop()
    _GUICtrlProgressSetMarquee($GUI_Progress, 0)
EndFunc;==>Progress_Stop

Func Progress_Time()
    $iTime = GUICtrlRead($GUI_Combo)
    _GUICtrlProgressSetMarquee($GUI_Progress, 1, $iTime)
EndFunc;==>Progress_Time

Func GUI_CLOSE()
    Exit
EndFunc;==>GUI_CLOSE 


;===============================================================================
;
; Function Name:    _GUICtrlProgressMarqueeCreate()
; Description:  Creates a marquee sytle progress control
; Parameter(s):  $i_Left    - The left side of the control
;              $i_Top  - The top of the control
;              $i_Width   - Optional: The width of the control
;              $i_Height  - Optional: The height of the control
; Requirement(s):   AutoIt3 Beta and Windows XP or later
; Return Value(s):  On Success - Returns the identifier (controlID) of the new control
;              On Failure - Returns 0  and sets @ERROR = 1
; Author(s):        Bob Anthony
;
;===============================================================================
;
Func _GUICtrlProgressMarqueeCreate($i_Left, $i_Top, $i_Width = Default, $i_Height = Default)
    
    Local Const $PBS_MARQUEE = 0x08
    
    Local $v_Style = $PBS_MARQUEE
    
    Local $h_Progress = GUICtrlCreateProgress($i_Left, $i_Top, $i_Width, $i_Height, $v_Style)
    
    
    If $h_Progress = 0 Then
        SetError(1)
        Return 0
    Else
        SetError(0)
        Return $h_Progress
    EndIf
    
EndFunc;==>_GUICtrlProgressMarqueeCreate

;===============================================================================
;
; Function Name:    _GUICtrlProgressSetMarquee()
; Description:  Sets marquee sytle for a progress control
; Parameter(s):  $h_Progress  - The control identifier (controlID)
;              $f_Mode      - Optional: Indicates whether to turn the marquee mode on or off
;                          0 = turn marquee mode off
;                          1 = (Default) turn marquee mode on
;              $i_Time      - Optional: Time in milliseconds between marquee animation updates
;                          Default is 100 milliseconds
; Requirement(s):   AutoIt3 Beta and Windows XP or later
; Return Value(s):  On Success - Returns whether marquee mode is set
;              On Failure - Returns 0  and sets @ERROR = 1
; Author(s):        Bob Anthony
;
;===============================================================================
;
Func _GUICtrlProgressSetMarquee($h_Progress, $f_Mode = 1, $i_Time = 100)
    
    Local Const $WM_USER = 0x0400
    Local Const $PBM_SETMARQUEE = ($WM_USER + 10)
    
    Local $var = GUICtrlSendMsg($h_Progress, $PBM_SETMARQUEE, $f_Mode, Number($i_Time))
    If $var = 0 Then
        SetError(1)
        Return 0
    Else
        SetError(0)
        Return $var
    EndIf
    
EndFunc;==>_GUICtrlProgressSetMarquee

Share this post


Link to post
Share on other sites



What doesn't work???... no explanation????

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Well, just because i can find the problem, but there were no "errors"

#include <GUIConstants.au3>
#include <XSkin.au3>

Local Const $PBS_MARQUEE = 0x08

Opt("GUIOnEventMode", 1)

$Skin_Folder = @ScriptDir & "\Skins\Universal"
$Icon_Folder = @ScriptDir & "\dat"

$XSkinGui = XSkinGUICreate ("Marquee", 200, 100, $Skin_Folder)
GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_CLOSE")

$XIcon = XSkinIcon ($XSkinGui, 2)
GUICtrlSetOnEvent($XIcon[1], "GUI_CLOSE")
GUICtrlSetOnEvent($XIcon[2], "GUI_MIN")

$GUI_Progress = XSkinProgress (50, 30, 100, 20)
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlSetBkColor(-1, 0x000073)
GUICtrlSetStyle($GUI_Progress, $PBS_MARQUEE)



$GUI_Button_Start = GUICtrlCreateButton("Start", 40, 50)
GUICtrlSetOnEvent(-1, "Progress_Start")


$GUI_Combo = GUICtrlCreateCombo("", 78, 52, 50)
GUICtrlSetData(-1, "1|10|50|100|300|500")
GUICtrlSetOnEvent(-1, "Progress_Time")


$GUI_Button_Stop = GUICtrlCreateButton("Stop", 135, 50)
GUICtrlSetOnEvent(-1, "Progress_Stop")
GUISetState()

While 1
    Sleep(100)
WEnd


Func Progress_Start()
    _GUICtrlProgressSetMarquee($GUI_Progress)
EndFunc   ;==>Progress_Start

Func Progress_Stop()
    _GUICtrlProgressSetMarquee($GUI_Progress, 0)
EndFunc   ;==>Progress_Stop

Func Progress_Time()
    $iTime = GUICtrlRead($GUI_Combo)
    _GUICtrlProgressSetMarquee($GUI_Progress, 1, $iTime)
EndFunc   ;==>Progress_Time

Func GUI_MIN()
    GUISetState(@SW_MINIMIZE)
EndFunc   ;==>GUI_MIN

Func GUI_CLOSE()
    Exit
EndFunc   ;==>GUI_CLOSE



;===============================================================================
;
; Function Name:    _GUICtrlProgressSetMarquee()
; Description:    Sets marquee sytle for a progress control
; Parameter(s):  $h_Progress  - The control identifier (controlID)
;               $f_Mode        - Optional: Indicates whether to turn the marquee mode on or off
;                           0 = turn marquee mode off
;                           1 = (Default) turn marquee mode on
;               $i_Time        - Optional: Time in milliseconds between marquee animation updates
;                           Default is 100 milliseconds
; Requirement(s):   AutoIt3 Beta and Windows XP or later
; Return Value(s):  On Success - Returns whether marquee mode is set
;               On Failure - Returns 0  and sets @ERROR = 1
; Author(s):        Bob Anthony
;
;===============================================================================
;
Func _GUICtrlProgressSetMarquee($h_Progress, $f_Mode = 1, $i_Time = 100)

    Local Const $WM_USER = 0x0400
    Local Const $PBM_SETMARQUEE = ($WM_USER + 10)

    Local $var = GUICtrlSendMsg($h_Progress, $PBM_SETMARQUEE, $f_Mode, Number($i_Time))
    If $var = 0 Then
        SetError(1)
        Return 0
    Else
        SetError(0)
        Return $var
    EndIf

EndFunc   ;==>_GUICtrlProgressSetMarquee

8)

Edited by Valuater

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