Hier hab mal schnell was gemacht
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$oWMP = ObjCreate("WMPlayer.OCX")
[/autoit] [autoit][/autoit] [autoit]GUICreate("", 625, 443, 192, 124)
GUICtrlCreateObj($oWMP, 10, 10, 500, 200)
$Play = GUICtrlCreateButton("Play", 24, 264, 97, 25, $WS_GROUP)
$Pause = GUICtrlCreateButton("Pause", 136, 264, 105, 25, $WS_GROUP)
$Stop = GUICtrlCreateButton("Stop", 264, 264, 121, 25, $WS_GROUP)
With $oWMP
.uiMode = "none"
.fullscreen = False
.url = @ScriptDir & "\AutoIt Tutorial Part 0 (Introduction).avi"
.controls.stop ;Auskommentieren wenn autostart erwünscht ist
EndWith
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Play
If $oWMP.controls.isAvailable("play") Then $oWMP.controls.play()
Case $Pause
If $oWMP.controls.isAvailable("pause") Then $oWMP.controls.pause()
Case $Stop
If $oWMP.controls.isAvailable("stop") Then $oWMP.controls.stop()
EndSwitch
WEnd