Hi Leute - und wieder mal eine Frage von mir.
Ich habe eine Avidatei (=> Anhang) und möchte, dass diese in einem GUI abgespielt wird (automatisch im Hintergrund).
Ich hab es wie in den scripten in diesem Thread ausprobiert: [ gelöst ] Wie füge ich eine video ein? aber geklappt hat es trotzdem nicht.
Liegt das an meiner avi convertierung? Ursprünglich war es ein animiertes GIF, dass ich mit Super convertiert hab.
Vielen Dank für eure Hilfe
Aquaplant
PS: Das avi file konnte ich nicht uploaden wegen unbekannter Dateiendung *grummel*, aber ich hoffe das gif tuts auch
avi file einbinden und abspielen
-
- [ offen ]
-
Aquaplant -
18. November 2009 um 14:30 -
Geschlossen -
Erledigt
-
-
Einfach die gif Datei mit VirtualDub zu avi umwandeln und dann sollte es auch mit GUICtrlCreateAvi klappen.
Hier mal der Downloadlink:
VirtualDubmfg hulle
-
Danke, jetzt klappts auch

/Edit: Und wie kann ich jetzt die Größe vom Avi verändern? Mit GUICtrlCreateAvi(@ScriptDir & "\Acethylsalicylsäure.AVI", 1, -1, -1, XX, XX) denen gehts schonmal nicht. Wie kann ich das Originalavi abspielen ( wenn ich es jetzt abspiele ist der avi Hintergrund nicht mehr Schwarz sondern wie der GUI Hintergrund) -
Du könntest den Hintergrund mit
[autoit]GUISetBkColor(000000)
[/autoit]auf schwarz setzen, was anderes fällt mir da auch nicht ein ..

Und das mit der größe würde mich auch mal interessieren

-
Wie wär's, wenn du das Gif in ein
[autoit]_IECreateembedded (); <-----Klick mich!
[/autoit]einfügst?
MfG tobi_girst -
Hab mal ein Beispiel für
[autoit]_IECreateembedded ()
[/autoit]geschrieben.
Spoiler anzeigen
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <WindowsConstants.au3>
#include <IE.au3>$oIE = _IECreateEmbedded ()
[/autoit] [autoit][/autoit] [autoit]GUICreate("Test", 1000, 800)
[/autoit]
GUISetState()
GUICtrlCreateObj($oIE, 0, 0, 850, 700)
_IENavigate($oIE,@ScriptDir & "\Acethylsalicylsäure.gif")Edit: Habe eine UDF von Xeno gefunden
:Spoiler anzeigen
[autoit]#include-once
[/autoit]
#include<IE.au3>
;===============================================================================
;
; Function Name: _GUICtrlCreateGIF()
; Description: Create an Animated GIF control
; Parameter(s): $gif [required] path and filename of the animated GIF
; $x [optional] x pos of the top-left corner
; $y [optional] y pos of the top-left corner
; $border [optional] 0 = no border
; any other = sunken border
; Requirement(s): #include <IE.au3>
; Return Value(s):
; controlID of the control created
; Author(s): elgabionline, gafrost, Ed_Maximized
;
;===============================================================================
Func _GUICtrlCreateGIF($gif,$x=0,$y=0,$border=0)
Local $pwidth,$pheight,$oIE,$GUIActiveX
_GetGifPixWidth_Height($gif, $pwidth, $pheight)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX = GUICtrlCreateObj($oIE, $x, $y, $pwidth, $pheight)
$oIE.navigate ("about:blank")
While _IEPropertyGet ($oIE, "busy")
Sleep(100)
WEnd
$oIE.document.body.background = $gif
$oIE.document.body.scroll = "no"
if $border=0 then $oIE.document.body.style.border = "0px"
Return $oIE
EndFunc
;===============================================================================
;
; Function Name: _GUICtrlStopGIF()
; Description: stop an Animated GIF control created with _GUICtrlCreateGIF()
; Parameter(s): $Control [required] controlID of the control returned by _GUICtrlCreateGIF()
;
; Requirement(s): #include <IE.au3>
; Return Value(s):
; none
; Author(s): lod3n, Ed_Maximized
;
;===============================================================================
Func _GUICtrlStopGIF($Control)
_IEAction ($Control, "stop" ) ; stop
EndFunc
;===============================================================================
;
; Function Name: _GUICtrlResumeGIF()
; Description: resume an Animated GIF control created with _GUICtrlCreateGIF()
; Parameter(s): $Control [required] controlID of the control returned by _GUICtrlCreateGIF()
;
; Requirement(s): #include <IE.au3>
; Return Value(s):
; none
; Author(s): lod3n, Ed_Maximized
;
;===============================================================================
Func _GUICtrlResumeGIF($Control)
$Control.document.body.background = $Control.document.body.background ;resume
EndFunc
;===============================================================================
;
; Function Name: _GetGifPixWidth_Height()
; Description: return the size of a GIF image in pixels
; Parameter(s): $s_gif [required] path and filename of the animated GIF
;
; Requirement(s): #include <IE.au3>
; Return Value(s):
; $pwidth = width of the GIF in pixels
; $pheight = height of the GIF in pixels
; Author(s): gafrost
;
;===============================================================================
Func _GetGifPixWidth_Height($s_gif, ByRef $pwidth, ByRef $pheight)
If FileGetSize($s_gif) > 9 Then
Local $sizes = FileRead($s_gif, 10)
ConsoleWrite("Gif version: " & StringMid($sizes, 1, 6) & @LF)
$pwidth = Asc(StringMid($sizes, 8, 1)) * 256 + Asc(StringMid($sizes, 7, 1))
$pheight = Asc(StringMid($sizes, 10, 1)) * 256 + Asc(StringMid($sizes, 9, 1))
ConsoleWrite($pwidth & " x " & $pheight & @LF)
EndIf
EndFunc ;==>_GetGifPixWidth_Height