Das ist ja lustig... denn bei mir funktioniert dein Script auf Windows 10 nicht. Auf Windows 7 aber wohl... ha, was ist denn das wieder für ein Sch...
; Windows 7: Microsoft Windows [Version 6.1.7601]
; @AutoItVersion: 3.3.14.5, @OSType: WIN32_NT, @OSVersion: WIN_7, @OSArch: X64
; Windows 10: Microsoft Windows [Version 10.0.17134.112]
; @AutoItVersion: 3.3.14.5, @OSType: WIN32_NT, @OSVersion: WIN_10, @OSArch: X64
Auch diese Minimalbeispiel hier funktioniert nur auf Windows 7...
AutoIt
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
Example()
Func Example()
GUICreate("Marquee Progress Bar", 290, 90, -1, -1) ; An example of starting/stopping a scrolling marquee of a progress bar.
Local $idProgress = GUICtrlCreateProgress(10, 10, 270, 20, $PBS_MARQUEE)
Local $idStart = GUICtrlCreateButton("&Start", 10, 60, 70, 25)
Local $idStop = GUICtrlCreateButton("S&top", 85, 60, 70, 25)
Local $idExit = GUICtrlCreateButton("E&xit", 160, 60, 70, 25)
GUISetState(@SW_SHOW)
; Loop until the user exits.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $idExit
ExitLoop
Case $idStart
ConsoleWrite('+ Start...' & @CRLF)
GUICtrlSendMsg($idProgress, $PBM_SETMARQUEE, 1, 50) ; Send the message $PBM_SETMARQUEE and wParam of 1 to start the scrolling marquee.
Case $idStop
ConsoleWrite('- Stop...' & @CRLF)
GUICtrlSendMsg($idProgress, $PBM_SETMARQUEE, 0, 50) ; Send the message $PBM_SETMARQUEE and wParam of 0 to stop the scrolling marquee.
EndSwitch
WEnd
EndFunc ;==>Example
Alles anzeigen
Edit: Grrr... liegt an meinem Style mit WindowsBlind... ohne sieht es so aus... (Windows 10)
Edit2: Workaround mit WindowsBlind
AutoIt
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
Example()
Func Example()
GUICreate("Marquee Progress Bar", 290, 90, -1, -1) ; An example of starting/stopping a scrolling marquee of a progress bar.
Local $idProgress = GUICtrlCreateProgress(10, 10, 270, 20, $PBS_MARQUEE)
DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", "Explorer", "wstr", 0)
GUICtrlSetColor(-1, 0x66cc00)
GUICtrlSetBkColor(-1, 0x44aa00)
Local $idStart = GUICtrlCreateButton("&Start", 10, 60, 70, 25)
Local $idStop = GUICtrlCreateButton("S&top", 85, 60, 70, 25)
Local $idExit = GUICtrlCreateButton("E&xit", 160, 60, 70, 25)
GUISetState(@SW_SHOW)
; Loop until the user exits.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $idExit
ExitLoop
Case $idStart
ConsoleWrite('+ Start...' & @CRLF)
GUICtrlSendMsg($idProgress, $PBM_SETMARQUEE, 1, 50) ; Send the message $PBM_SETMARQUEE and wParam of 1 to start the scrolling marquee.
Case $idStop
ConsoleWrite('- Stop...' & @CRLF)
GUICtrlSendMsg($idProgress, $PBM_SETMARQUEE, 0, 50) ; Send the message $PBM_SETMARQUEE and wParam of 0 to stop the scrolling marquee.
EndSwitch
WEnd
EndFunc ;==>Example
Alles anzeigen