Jump to content
Sign in to follow this  
ToKicoBrothers

SimplePlayer 1.0

Recommended Posts

ToKicoBrothers

Here's my first official script!

;~ Name: SimplePlayer 1.0
;~ Author: ToKico Brothers
;~         tokico.pt@gmail.com
;~ Description: This script is a very simple music player.

#include <GUIConstants.au3>

#Region ### START Koda GUI section ###
$Form2 = GUICreate("  SimplePlayer 1.0", 226, 61, 303, 219)
$Button1 = GUICtrlCreateButton("Play", 8, 8, 65, 25, 0)
$Button2 = GUICtrlCreateButton("Stop", 152, 8, 65, 25, 0)
$Button3 = GUICtrlCreateButton("Open", 80, 24, 65, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button3
            $opendialog = FileOpenDialog ( "Open Music...", @ScriptDir, "Music (*.*)")
        Case $Button1
            SoundPlay ( $opendialog )
        Case $Button2
            SoundPlay ( "" )
    EndSwitch
WEnd

It's very simple, but I'll make more versions!

SimplePlayer.au3


My Scripts: SimplePlayer 1.0 - A very simple music player. PCInfo 1.2 - A script that displays PC information.

Share this post


Link to post
Share on other sites
Sn0opy

hehe, very easy script^^ try read the file name or the id3-tag to display the song's name anywhere in the player. and maybe you could make the gui smaller, more simple :)

Share this post


Link to post
Share on other sites
BillLuvsU

Good for a first script. Keep on learning!


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites
alex OF DEATH

I made this a while ago.

Steal some ideas from it or whatever, I don't personally care about the script at all anymore.

Have fun?

#include <GUIConstants.au3>
#Include <GuiList.au3>

Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("SimplePlayer", 424, 143, 219, 162)
$VolumeControl = GUICtrlCreateSlider(240, 88, 105, 41)
GUICtrlSetOnEvent ( $VolumeControl, "VolumeAdjust" )
$repeat = GUICtrlCreateCheckbox("Repeat?", 344, 88, 65, 17)
$Play = GUICtrlCreateCheckbox("Play/Stop", 344, 112, 73, 25)
GUICtrlSetOnEvent ( $Play, "Play" )
GUICtrlSetOnEvent ( $Repeat, "Exot" )
$PlayList = GUICtrlCreateList("", 0, 16, 233, 121)
$SongOpen = GUICtrlCreateButton("Open a Song(s)", 248, 48, 97, 33, 0)
GUICtrlSetOnEvent ( $songOpen, "OpenSong" )
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd


;---------------------GUI ^ ------ Functions v ---------------------
Func OpenSong()
$File = FileOpenDialog ( "Select Song Please", "C:", "Mp3 (*.Mp3)" , 4  )
$Text = $File
$Name = FileGetShortName ($text, 1)
GUICtrlSetData ( $playlist, "" & $name )
Play()
EndFunc

Func Play()
SOUNDPLAY ( GuiCTRLREAD ( $Playlist) , $PlayList )
Endfunc

Func volumeAdjust()
    SoundSetWaveVolume(GuiCTRLread ($VolumeControl ) )
EndFunc

Func exot()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
ToKicoBrothers

Thanks guys! Right now I'm developing version 1.2 with:

  • Image buttons
  • Volume Slider
  • ID3 Tags (Maybe)

My Scripts: SimplePlayer 1.0 - A very simple music player. PCInfo 1.2 - A script that displays PC information.

Share this post


Link to post
Share on other sites
ToKicoBrothers

For the next version I will call it: ToKicoPlayer. Like it? :)


My Scripts: SimplePlayer 1.0 - A very simple music player. PCInfo 1.2 - A script that displays PC information.

Share this post


Link to post
Share on other sites
BrettF

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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.