Hallo an euch allen !
Ich will ein kleines Project Basteln mit Koda und will ein Video (.avi) mit einbauen das auch wenn das video zu ende ist wieder von vorne anfängt (endlosschleife). doch egal welche avi datei ich einbaue es passiert nichts und eine meldung kommt das er es nicht könnte. Das projekt soll eine art Fleier werden und das video soll in das erstellte fenster abgespielt werden.
nun hier ist schon mal mein Skript was noch nicht fertig ist.
Spoiler anzeigen
#include <AVIConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Megatron\Desktop\Form2.kxf
$Form2 = GUICreate("Form2", 602, 452, 196, 126)
GUISetBkColor(0xFF00FF)
$Label1 = GUICtrlCreateLabel("MaDonna", 240, 8, 344, 91)
GUICtrlSetFont(-1, 65, 400, 0, "MS PMincho")
GUICtrlSetColor(-1, 0x3399FF)
$Label2 = GUICtrlCreateLabel("Mädchenkult e.v", 320, 88, 187, 33)
GUICtrlSetFont(-1, 20, 400, 0, "Modern No. 20")
GUICtrlSetColor(-1, 0x3399FF)
$Pic1 = GUICtrlCreatePic("C:\Users\Megatron\Desktop\alte_muster.jpg", 240, 120, 337, 41, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Pic2 = GUICtrlCreatePic("C:\Users\Megatron\Desktop\test55.jpg", 8, 8, 209, 177, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Avi1 = GUICtrlCreateAvi("No File", -1, 232, 176, 361, 265)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
und hier ein skript von TheShadowAE das es fast ist was ich bräuchte und funkioniert.
Spoiler anzeigen
#NoTrayIcon
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=D:\Progen\AutoIt\Meine\Forms\Video.kxf
$Form1 = GUICreate("Kleiner Videoplayer", 633, 447, 193, 125)
$wmp = ObjCreate("wmplayer.ocx")
$obj=GUICtrlCreateObj($wmp,32, 32, 561, 329)
$Slider1 = GUICtrlCreateSlider(32, 376, 561, 25)
GUICtrlSetLimit($Slider1,100,0)
$Button1 = GUICtrlCreateButton("Start/Weiter", 32, 408, 89, 25, 0)
$Button2 = GUICtrlCreateButton("Pause", 144, 408, 89, 25, 0)
$Button4 = GUICtrlCreateButton("Stop", 260, 408, 81, 25, 0)
$Button5 = GUICtrlCreateButton("Datei", 494, 408, 81, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
With $WMP
.URL = ("")
.fullScreen = True
;.windowlessVideo = True
.stretchToFit = True
.enableContextMenu = True
.enabled = True
.uiMode = "full"; none / mini full
.settings.autostart = True
.settings.mute = True
.settings.volume = 100; 0 - 100
.settings.Balance = 0; -100 to 100
EndWith
if $CmdLine[0]>0 Then
$wmp.URL=($cmdline[1])
$wmp.controls.play()
EndIf
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button5
$file=FileOpenDialog("Video auswählen","","Videos(*.mp4)",11)
$wmp.URL=($file)
$wmp.controls.play()
Case $Button1
$wmp.controls.play()
Case $Button4
$wmp.controls.stop()
case $Button2
$wmp.controls.pause()
Case $Slider1
EndSwitch
WEnd
ich erkläre mal was ich genau vorgestellt habe und es bei mir ihrgendwie nicht klappt.
1. das video soll gleich beim Start des Fenster gespielt werden oder eine kleine verzögerung von 15 Sekunden
2. Das Video soll am ende von vorn anfangen also eine Endlos Schleife
3. Der Player (steuerungselement) soll verbogen sein (wünschens wert zu wissen wie man die steuerungelemente ein und ausblendet)
4. für das Video soll keine Buttons benutzt werden.
Bitte um Hilfe da ich mit koda die videos noch nie eingebaut habe?
Mit freundlichen Grüßen
Baron