Jump to content

Music Player


AutoItKing
 Share

Recommended Posts

This is just a random script i made in my free time.

It's not as good as WMP, but it's OK.

Edited by AutoItKing
http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

Thanks for sharing but would you post your code? It would be nice to see what I am downloading..

Cheers.. :o

Certainly!

#include<GUIConstants.au3>

$sound="C:\notthere.mp3"
$width=600
$height=500
SoundSetWaveVolume(100)
GuiCreate("Ben Music Player",$width,$height,-1,-1,$WS_MAXIMIZEBOX + $WS_MINIMIZEBOX)
GUISetState(@SW_SHOW)
GuiCtrlCreateGroup("Music",5,0,500,100)
$button1=GuiCtrlCreateButton("1",15,20,35,35,$BS_ICON + $BS_FLAT)
GuiCtrlSetImage(-1,"dlls\world.dll",0,1)
$button2=GuiCtrlCreateButton("2", 55,20,35,35,$BS_ICON + $BS_FLAT)
GuiCtrlSetImage(-1,"dlls\niceopen.dll",0,1)
$buttonstop=GuiCtrlCreateButton("Stop", 95, 20, 100,35,$BS_FLAT)
$open=GuiCtrlCreateButton("Open", 200,20,35,35,$BS_ICON + $BS_FLAT)
GuiCtrlSetImage(-1,"dlls\open3.dll",0,1)
$play=GuiCtrlCreateButton("Play",125,55,35,35,$BS_FLAT)
GuiCtrlCreateLabel("Open",205,60,35,15)
GuiCtrlCreateLabel("Tivola",15,60,35,15)
GuiCtrlCreateLabel("Zoom",55,60,35,15)
$edit=GuiCtrlCreateEdit($sound, 270,  20, 200, 16, $ES_READONLY, $WS_EX_STATICEDGE)


While 1
      
$msg = GUIGetMsg()

  Select
        
;If GUI is closed do this:
        Case $msg = $GUI_EVENT_CLOSE
        MsgBox(0,"Alert","Why you do this????")
        GUIDelete()
        Exit
    
;If GUI is minimized do this:
    Case $msg = $GUI_EVENT_MINIMIZE    
    MsgBox(0,"Alert","Y u du dis????")

    Case $msg = $button1
    SoundPlay("C:\Program Files\crazy\crazy.aif")
    
    Case $msg = $button2
    SoundPlay("C:\program files\crazy\multi.wav")
    
    Case $msg = $buttonstop
    SoundPlay("C:\notthere.mp3")
    
    Case $msg = $open
    $sound=FileOpenDialog("Open Music File","C:\","All Files(*.*)",3)
    GUICtrlSetData($edit, $sound)

    Case $msg = $play
    SoundPlay($sound)

    
endselect

WEnd

Please feel free to add any comments, suggestions, concerns, complaints, changes, things like that!

Toodels! B)

Edited by AutoItKing
http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

Certainly!

Please feel free to add any comments, suggestions, concerns, complaints, changes, things like that!

Toodels! B)

@AutoItKing, interesting.. The basic script worked well but there are some embedded graphics and audio files which you have embedded. A good technique I have learned in the forum is to create a basic directory structure with your graphic/audio/setup files etc in subdirectorys of the project your are working on, example:

\MusicPlayer

\MusicPlayer\audio

\MusicPlayer\graphics

\MusicPlayer\setup

This way you do not have to deal with "C:\???\??\??.?? Obviously, these would be all part of a zip file. In addition you should personalize your code :graduated: for example:

#cs
  Title:                MusicPlayer
  ScriptVer:       1.0
  Author:           AutoItKing
  AutoItVer:      3.1.1.84
  AutoItForum:  http://www.autoitscript.com/forum/index.php?act=Post&CODE=02&f=9&t=17288&qpid=119313
  Date:            10-25-2005
  Description:   Plays Music files..
#ce

This just looks cool to have your code out there and when other people know where the this code came from.

Also, there were some words used that I did not know what they meant.

Like what you came up with. Are you planning on developing this project of yours?

Cheers.. :o

Link to comment
Share on other sites

Also, there were some words used that I did not know what they meant.

Like what you came up with. Are you planning on developing this project of yours?

Cheers.. :o

Those words are actualy just the names of two media files I had on my computer. the first one is from a German game. The second is actually from Zoombininis.

And yes i plan on expanding on this project, just not right now. B)

Edited by AutoItKing
http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

Those words are actualy just the names of two media files I had on my computer. the first one is from a German game. The second is actually from Zoombininis.

And yes i plan on expanding on this project, just no right now. :o

Got ya on the audio files.. :)

Glad to here that you will be expanding on this project. I am curious how it will develop. B)

Cheers.. :graduated:

Link to comment
Share on other sites

@AutoItKing:

Thanks for posting this. I am a newbie so this may be a stupid question, but why are you using dlls for the images? Wouldn't a BMP or JPG be easier?

The images are embeded in the dlls and i just find it a little easier and no one is gonna steal my icons!

http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

I made an audio player, similar to this, after editing a script posted in this forum a while ago. It's located here: http://stealth.bleachseven.com/audiolite.rar

The exe, screenshot, and ini file is located in that archive, I can't find the source anywhere on my computer. (file is NOT harmful; if you do not like to run .exes, that's your choice).

Edited by Kardus
Link to comment
Share on other sites

Right now I am actually working on making a playlist function for it.

http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...