testingtest Posted May 17, 2007 Posted May 17, 2007 this is for my usb its pretty case sensitive if you push pause and play real fast it will play the same song twice but over all its nice for a usb I use it at school a lot. I lost the source but I think you guys will trust me I try to helpvideo_player.zip
Sn0opy Posted May 17, 2007 Posted May 17, 2007 (edited) ok, i tried it without looking at the source. it's a very nice tiny tool what i was looking vor since a friend showed me his linux desktop. his video window looked like this. a very simple window, without any buttons etc. do you used standard autoit commands or any udfs too? //edit: ok, some ideas: - add a screenshot function - make it screenshot compatible. when i press the button and paste the screenshot into paint or irfan view the video will disappear, when i move the window - (for videos only) just make 1 window. when i press play the "Video Player - XXX" window will disappear completly and when i press a key it will appear again Edited May 17, 2007 by Sn0opy
testingtest Posted May 17, 2007 Author Posted May 17, 2007 ok, i tried it without looking at the source.it's a very nice tiny tool what i was looking vor since a friend showed me his linux desktop. his video window looked like this. a very simple window, without any buttons etc. do you used standard autoit commands or any udfs too?//edit: ok, some ideas:- add a screenshot function- make it screenshot compatible. when i press the button and paste the screenshot into paint or irfan view the video will disappear, when i move the window- (for videos only) just make 1 window. when i press play the "Video Player - XXX" window will disappear completly and when i press a key it will appear againhmm you want to hide the video screen right never though of adding that but I will once I find the source and Ill post the new one
Obi-w00t Posted May 17, 2007 Posted May 17, 2007 You could have easily recovered the source, if you don't know how I can post it here for you. The program seems pretty good, except I can't get sound on some videos.
testingtest Posted May 17, 2007 Author Posted May 17, 2007 You could have easily recovered the source, if you don't know how I can post it here for you. The program seems pretty good, except I can't get sound on some videos.you might not be able to get some videos working becuase of there format not sure
NELyon Posted May 18, 2007 Posted May 18, 2007 I can recover the source for you. Do you mind if i post it for you?
Dhilip89 Posted May 18, 2007 Posted May 18, 2007 (edited) Nice example uses of Media Control Interface API. There is the source code: expandcollapse popup#include <GUIConstants.au3> Opt("WinTitleMatchMode",2) Opt("OnExitFunc","_exit") Opt("GuiOnEventMode",1) Global $mystatus = "Paused" Global $pause = 0 Global $wintitle = "none" $GUI = GUICreate("Video Player - Idle" , 300, 26 , 0 , 0) $Play = GUICtrlCreateButton("Play", 0, 0, 75, 25, 0) $Pause = GUICtrlCreateButton("Pause", 75, 0, 75, 25, 0) $Stop = GUICtrlCreateButton("Stop", 150, 0, 75, 25, 0) $Load = GUICtrlCreateButton("Load", 225, 0, 75, 25, 0) GUICtrlSetOnEvent($Play , "_Play") GUICtrlSetOnEvent($Pause , "_Pause") GUICtrlSetOnEvent($Stop , "_Stop") GUICtrlSetOnEvent($Load , "_Load") GUISetOnEvent($GUI_EVENT_CLOSE , "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(1000) Wend Func mciSendString($string) Local $ret $ret = DllCall("winmm.dll","int","mciSendString","str",$string,"str","","int",65534,"hwnd",0) If Not @error Then Return $ret[2] EndFunc Func _Exit() mciSendString("Close myvideo") Exit EndFunc Func _Play() $pause = 0 mciSendString("play myvideo repeat") $mystatus = "PLAYING" WinSetTitle($GUI , "" , "Video Player - Playing") EndFunc Func _Stop() mciSendString("Stop myvideo") mciSendString("seek myvideo to start") $mystatus = "STOPPED" WinSetTitle($GUI , "" , "Video Player - Stopped") EndFunc Func _Load() mciSendString("Close myvideo") $file = FileOpenDialog("OPEN","","Video (*.mp3;*.avi;*.mpg)") $wintitle = stringsplit($file,"\") $wintitle = $wintitle[$wintitle[0]] $file = '"'&$file&'"' mciSendString("open "&$file&" alias myvideo") _Play() EndFunc Func _Pause() If $pause = 0 Then mciSendString("stop myvideo") $mystatus = "PAUSED" WinSetTitle($GUI , "" , "Video Player - Paused") $pause = 1 Else _Play() EndIf EndFunc Edited May 18, 2007 by Dhilip [u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠2[/quote]
Gif Posted May 20, 2007 Posted May 20, 2007 (edited) Nice example uses of Media Control Interface API. There is the source code: expandcollapse popup#include <GUIConstants.au3> Opt("WinTitleMatchMode",2) Opt("OnExitFunc","_exit") Opt("GuiOnEventMode",1) Global $mystatus = "Paused" Global $pause = 0 Global $wintitle = "none" $GUI = GUICreate("Video Player - Idle" , 300, 26 , 0 , 0) $Play = GUICtrlCreateButton("Play", 0, 0, 75, 25, 0) $Pause = GUICtrlCreateButton("Pause", 75, 0, 75, 25, 0) $Stop = GUICtrlCreateButton("Stop", 150, 0, 75, 25, 0) $Load = GUICtrlCreateButton("Load", 225, 0, 75, 25, 0) GUICtrlSetOnEvent($Play , "_Play") GUICtrlSetOnEvent($Pause , "_Pause") GUICtrlSetOnEvent($Stop , "_Stop") GUICtrlSetOnEvent($Load , "_Load") GUISetOnEvent($GUI_EVENT_CLOSE , "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(1000) Wend Func mciSendString($string) Local $ret $ret = DllCall("winmm.dll","int","mciSendString","str",$string,"str","","int",65534,"hwnd",0) If Not @error Then Return $ret[2] EndFunc Func _Exit() mciSendString("Close myvideo") Exit EndFunc Func _Play() $pause = 0 mciSendString("play myvideo repeat") $mystatus = "PLAYING" WinSetTitle($GUI , "" , "Video Player - Playing") EndFunc Func _Stop() mciSendString("Stop myvideo") mciSendString("seek myvideo to start") $mystatus = "STOPPED" WinSetTitle($GUI , "" , "Video Player - Stopped") EndFunc Func _Load() mciSendString("Close myvideo") $file = FileOpenDialog("OPEN","","Video (*.mp3;*.avi;*.mpg)") $wintitle = stringsplit($file,"\") $wintitle = $wintitle[$wintitle[0]] $file = '"'&$file&'"' mciSendString("open "&$file&" alias myvideo") _Play() EndFunc Func _Pause() If $pause = 0 Then mciSendString("stop myvideo") $mystatus = "PAUSED" WinSetTitle($GUI , "" , "Video Player - Paused") $pause = 1 Else _Play() EndIf EndFunc Great job man awsome!!!!! i think that i should include videos in my musci player eventhough i "forgot it" a bit, and messed up my scipt small source but the video player indeed works perfect. i think that the most advanced users should think about creating a program so usefull (a media player) Edited May 20, 2007 by c4nm7
Gif Posted May 20, 2007 Posted May 20, 2007 Great job man awsome!!!!!i think that i should include videos in my musci player eventhough i "forgot it" a bit, and messed up my scipt small source but the video player indeed works perfect.i think that the most advanced users should think about creating a program so usefull (a media player)continue it, it's great, i mena fix some bugs add context menu, if possible fullscreen (definatly $WS_SIZEBOX+$WS_SYSMENU+$WS_MAXIMIZEBOX+$WS_MINIMIZEBOX)and make it a bit easier to use....great one and a really exceptional idea!!
testingtest Posted May 20, 2007 Author Posted May 20, 2007 I am thinking about a listview that is either binded to a hotkey or added in the gui to make a playlist
testingtest Posted May 20, 2007 Author Posted May 20, 2007 (edited) my teacher is being a pain so here will be a example of my next version still thinking and sort of busy #include <Constants.au3> #include <Sound.au3> Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) Global $File , $Pause , $String TrayCreateItem("Play") TrayItemSetOnEvent(-1 , "_Play") TrayCreateItem("Stop") TrayItemSetOnEvent(-1 , "_Stop") TrayCreateItem("Pause") TrayItemSetOnEvent(-1 , "_Pause") TrayCreateItem("Select...") TrayItemSetOnEvent(-1 , "_Load") TrayCreateItem("Exit") TrayItemSetOnEvent(-1 , "_Exit") TraySetState() While 1 Sleep(10) WEnd Edited May 20, 2007 by testingtest
star2 Posted May 22, 2007 Posted May 22, 2007 nice job I was in a need to make a video player and I'm still working on it so I'll finish it up after that I'll try urs [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]
lokster Posted May 22, 2007 Posted May 22, 2007 The idea for video player made with autoit is good, but I don't think it's good idea to use MCI for this. Maybe dshow will be better.
leecole Posted May 22, 2007 Posted May 22, 2007 The idea for video player made with autoit is good, but I don't think it's good idea to use MCI for this. Maybe dshow will be better.Works for mpg recordings, but no sound for Xvid (avi) recordings. All my video recording get encoded to Xvid. Talking Clockhttp://www.autoitscript.com/forum/index.php?showtopic=20751Talking Headlineshttp://www.autoitscript.com/forum/index.php?showtopic=20655Sometimes, I sits and thinkssometimes, I just sits
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now