zeroZshadow Posted February 19, 2005 Share Posted February 19, 2005 I finealy dare to present........MY MEDIA PLAYER. it plays wav, mp3 and wma has a progress bar volume control playlist. hide and show function tray menu. and even a PLAY BUTTON!! and more to come. YOU NEED THE TRAY MENU THING TO MAKE THE SCRIPT WORK!! CAN BE FOUND IN THE IDEAS FORUM! expandcollapse popup#include <GuiConstants.au3> #notrayicon TraySetClick(16) Opt("GUIoneventmode",1) Opt("OnExitFunc","_write") Opt("TrayMenuMode",1) Opt("TrayOnEventMode",1) Global $songname[500] Global $song[500] Global $songGUI[500] Global $number Global $timer Global $timestop Global $playing = 0 Global $show = 1 $trayplay = TrayCreateItem("Play") $traystop = TrayCreateItem("Stop") $trayload = TrayCreateItem("Load") $trayexit = TrayCreateItem("Exit") TrayCreateItem("") $trayshow = TrayCreateItem("Hide") TraySetState() $GUIHANDLE = GuiCreate("Media Player", 336, 185,(@DesktopWidth-336)/2, 250,-1,0x00000010) $Input = GuiCtrlCreateInput("Drag And Drop Media files here.", 120, 10, 210, 20) GUICtrlSetState(-1,$GUI_ACCEPTFILES) $Listname = GUICtrlCreateListView ( "Playlist|path",10,10,100,149) _Loadplay() $Slider = GuiCtrlCreateSlider(110, 130, 190, 40) $Buttonplay = GuiCtrlCreateButton("Play", 120, 30, 70, 30) $Buttonload = GuiCtrlCreateButton("Load", 195, 30, 70, 30) $Buttonstop = GuiCtrlCreateButton("Stop", 120, 60, 30, 30) $Buttonadd = GuiCtrlCreateButton("Add", 150, 60, 30, 30) $menu = GUICtrlCreateMenu("File") $menushow = GUICtrlCreateMenuitem("Hide",$menu) $menuexit = GUICtrlCreateMenuitem("Exit",$menu) GUICtrlSetData($Slider,100) GUICtrlSetLimit ($Slider,100,0) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GuiCtrlSetOnEvent($ButtonPlay, "_Play") GuiCtrlSetOnEvent($Buttonstop, "_Stop") GuiCtrlSetOnEvent($Buttonadd, "_Add") GuiCtrlSetOnEvent($Buttonload, "_Load") GuiCtrlSetOnEvent($menushow, "_Show") GuiCtrlSetOnEvent($menuexit, "_Exit") TraySetItemOnEvent($trayplay,"_Play") TraySetItemOnEvent($traystop,"_stop") TraySetItemOnEvent($trayload,"_Load") TraySetItemOnEvent($trayexit,"_Exit") TraySetItemOnEvent($trayshow,"_Show") $progbar = GUICtrlCreateProgress(120,90,200,20,$PBS_SMOOTH) GuiSetState() While 1 sleep(10) $diff = TimerDiff($timer) $progressset = ($diff/$timestop*100) if $playing = 1 Then If $progressset >= 100 Then _play() EndIf EndIf GuiCtrlsetdata($progbar,$progressset,0) SoundSetWaveVolume (GUICtrlRead($slider)) WEnd Func _Exit() Exit EndFunc Func _play() $song = StringSplit (GUICtrlRead($input), "|") if $song[0] = 1 Then $FileName = '"'&$song[1]&'"' mciSendString("Open " & $FileName & " alias MediaFile") mciSendString("Set MediaFile time format milliseconds") $answer = mciSendString("Status MediaFile length") mciSendString("Close MediaFile") $timestop = $answer $timer = TimerInit() SoundPlay($song[1]) Else $FileName = '"'&$song[2]&'"' mciSendString("Open " & $FileName & " alias MediaFile") mciSendString("Set MediaFile time format milliseconds") $answer = mciSendString("Status MediaFile length") mciSendString("Close MediaFile") $timestop = $answer $timer = TimerInit() SoundPlay($song[2]) EndIf Global $playing = 1 EndFunc Func _Stop() Global $playing = 0 $diff = TimerDiff($timer) SoundPlay ("") EndFunc Func _loadplay() $number = IniRead ( "playlist.ini", "NUMBER", "number", "0" ) If $number > 0 Then For $num=1 to $number $songname[$num] = IniRead ( "playlist.ini", "NAME", "name"&$num, "Not found" ) $song[$num] = IniRead ( "playlist.ini", "PATH", "path"&$num, "Not found" ) $songGUI[$num] = GUICtrlCreateListViewItem ($songname[$num]&"|"&$song[$num],$listname) Next EndIf EndFunc Func _Add() $adder = GUICtrlRead($input) $check = Stringsplit($adder,"|") If $check[0] = 1 Then $name = InputBox("Name","What is the songs name? (***.mp3/***.wma..)") $number=$number+1 GUICtrlCreateListViewItem ($name&"|"&$adder,$listname) IniWrite ( "playlist.ini", "NUMBER", "number",$number) IniWrite ( "playlist.ini", "NAME", "name"&$number,$name) IniWrite ( "playlist.ini", "PATH", "path"&$number,$adder) Else GUICtrlCreateListViewItem ($adder,$listname) EndIf EndFunc 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 _Load() $load = FileOpenDialog("Open",@MyDocumentsDir,"Music Files (*.Wav;*.MP3;*.WMA)") if not $load = 1 Then GuiCtrlSetData($input,"") GuiCtrlSetData($input,$load) EndIf _play() EndFunc Func _Show() If $show = 1 Then GuiSetstate(@SW_HIDE,$GUIHANDLE) TraySetItemText($trayshow,"Show") $Show = 2 Else GuiSetstate(@SW_SHOW,$GUIHANDLE) TraySetItemText($trayshow,"Hide") $Show = 1 EndIf EndFunc hope ya like it *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zeroZshadow Posted February 19, 2005 Author Share Posted February 19, 2005 made a new version hotkeys added for: play stop load exit hide/show can be used as standert player because of cmd function. use this as operator : "C:\Documents and Settings\zeroZshadow\Mijn documenten\autoitscripts\petprogram\CMDmediaplayer.exe" "%L" *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
Dr Rave Posted February 20, 2005 Share Posted February 20, 2005 Tried It. It's not working. Got this: TraySetClick(16) ^Error Unknown function name. Don't know if I'm mistaken or not but do hope you solve it out. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 20, 2005 Developers Share Posted February 20, 2005 (edited) Tried It. It's not working. Got this:TraySetClick(16)^ErrorUnknown function name.Don't know if I'm mistaken or not but do hope you solve it out.<{POST_SNAPBACK}>You mean you are not using the TAY MENU THING ?? YOU NEED THE TRAY MENU THING TO MAKE THE SCRIPT WORK!!CAN BE FOUND IN THE IDEAS FORUM!<{POST_SNAPBACK}> Edited February 20, 2005 by JdeB SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Dr Rave Posted February 20, 2005 Share Posted February 20, 2005 You mean you are not using the TAY MENU THING ?? <{POST_SNAPBACK}>Yeah. You got it right. My mistake. Didn't know of it. Thanks for prompting. It's working fine now. Link to comment Share on other sites More sharing options...
zeroZshadow Posted February 20, 2005 Author Share Posted February 20, 2005 i fixed the playlist funtion now and it will play the playlist when the song is done. i also added a pause resume button, but it's not fully working. Delete stuff from playlist is also comming. i'll give the new script when the bugs are out. p.s. when its done it'll be able to FULLY replace mediaplayer (i hope) *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
zcoacoaz Posted February 22, 2005 Share Posted February 22, 2005 thats a note to all users who get this!You mean you are not using the TAY MENU THING ?? zero, why don't you post the compiled version so people don't have to download the special autoit? [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
zeroZshadow Posted February 22, 2005 Author Share Posted February 22, 2005 i'll do that when the big bugs are out. i made an installer now to make it ur default player also *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
sarkar112 Posted February 22, 2005 Share Posted February 22, 2005 Download the "tray menu thing" here.Then, open the media player with the autoit3.exe in the zip file. Link to comment Share on other sites More sharing options...
zcoacoaz Posted February 22, 2005 Share Posted February 22, 2005 <----ZeroPlayer ^------------Other players that is, once its completely finished [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
steveR Posted February 24, 2005 Share Posted February 24, 2005 I can't get it to work I dl'ed the "traymenu thing" zip file and I used the .exe to open the mediaplayer scipt. I drag n drop a .mp3 to the control and it shows up. But it won't play. (Yes I've checked my volume ) I must be doing something wrong. Do I need to put any of those .zip files in the autoit3 folder? If so which ones? Can someone explain what all those files are. I understand it creates a tray menu, but I don't know how to implement into my programs. Thanks AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
zeroZshadow Posted February 24, 2005 Author Share Posted February 24, 2005 (edited) i'll attach the last version of it. its decompile able with no pass if i remeber correctly Edited March 4, 2005 by zeroZshadow *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
steveR Posted February 24, 2005 Share Posted February 24, 2005 Still doesnt't work for me. Maybe it's my codecs I have installed. I have ffdshow and soundmax installed. AutoIt3 online docs Use it... Know it... Live it...MSDN libraryglobal Help and SupportWindows: Just another pane in the glass. Link to comment Share on other sites More sharing options...
zeroZshadow Posted March 3, 2005 Author Share Posted March 3, 2005 well it uses winmm.dll the WMP dll *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip... Link to comment Share on other sites More sharing options...
DirtyBanditos Posted March 3, 2005 Share Posted March 3, 2005 i'll attach the last version of it.its decompile able with no pass if i remeber correctly<{POST_SNAPBACK}>hello zeroZshadow thx for your media player,works good Thx to share it out Link to comment Share on other sites More sharing options...
eagle4life69 Posted October 19, 2005 Share Posted October 19, 2005 can no longer download tray thing can someone add it so we can all see it Link to comment Share on other sites More sharing options...
peter1234 Posted October 20, 2005 Share Posted October 20, 2005 eagle4life69: I deleted all of the statements using tray and the program seems to work (without tray menu). Link to comment Share on other sites More sharing options...
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