vlcek
Joined: 19 Feb 2007 Posts: 323 Location: Czech Republic
|
Posted: Tue Jul 01, 2008 6:07 pm Post subject: AVI player |
|
|
Hi all. I searched some avi player and I writing new function, but problem.
| Code: |
gui,-sysmenu
menu,menu,add,otevřít,open
menu,menu,add,konec,exit
gui,menu,menu
Gui, 1:Add,text,,
Gui, 1:Show, x0 y0 W600 H500 , AviPlayer
return
open:
FileSelectFile, someavi, 3,, Select multimedia file, Multimedia files (*.avi)
If someavi =""
return
else
avi := "%someavi%"
Gui, 2:+owner1
Gui, 2:-caption
Gui, 2:Show, x50 y50 W550 H450, title
WinGet, whndl ,ID, title
whndl += 0
buffer:= "0"
vsc := VarSetCapacity(buffer,256,0)
mcicom = open %avi% type avivideo alias xbmpeg
gosub winmm
mcicom = window xbmpeg handle %whndl%
gosub winmm
mcicom = play xbmpeg from 0
gosub winmm
OnMessage(0x47, "WM_WINDOWPOSCHANGED")
Return
WM_WINDOWPOSCHANGED()
{
gosub moving
}
moving:
WinGetPos, X, Y, Width, Height, Pil
WinMove, title,, x+50, y+50
return
winmm:
Result := DllCall("Winmm.dll\mciSendStringA", "str", mcicom, "str", buffer, "Uint", 256, "Uint", 0 )
return
GuiClose:
mcicom = close xbmpeg
gosub winmm
exit:
ExitApp
|
When I select thw avi file, the program can't play the selected file.
Can you help me with this?
[Title edited. Please write descriptive titles for your topics. ~jaco0646] _________________ Thanks. |
|