Sign in to follow this  
Followers 0
Evil_Has_Survived

Music Player Work In Progress

34 posts in this topic

hi I have a problem, it's pretty easy for you guys I bet, I think i should be using a esle statment maybe

#include <GUIConstants.au3>
#include <INet.au3>
GuiCreate("MyGUI", 750, 400,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS,))
GUISetBkColor(0x313594)
$oIE = ObjCreate("Shell.Explorer.2")
$Date_4 = GuiCtrlCreateDate("Date1", 200, 0, 190, 20)
$Slider_1 = GuiCtrlCreateSlider(0, 345, 200, 40)
$List_6 = GuiCtrlCreateList("Play List", 512.5, 40, 180, 317.5)
$Button_7 = GuiCtrlCreateButton("previous", 0, 0, 60, 20)
$Edit_8 = GuiCtrlCreateEdit("Edit6", 150, 240, 1, 1)
$Button_9 = GuiCtrlCreateButton("play/pause", 60, 0, 60, 20)
$Edit_10 = GuiCtrlCreateEdit("Edit8", 130, 230, 1, 1)
$Button_11 = GuiCtrlCreateButton("next", 120, 0, 60, 20)
$Button_14 = GuiCtrlCreateButton("stop", 0, 20, 60, 20)
$Checkbox_15 = GuiCtrlCreateCheckbox("Mute", 120, 20, 60, 20)
$b = GUICtrlCreateButton("HitKast", 60, 20, 60, 20)
GUISetState()  ;Show GUI

; Waiting for user to close the window
While 1
   $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $b
         open()
 Case $Slider_1 
While 1
Sleep( 100 )
SoundSetWaveVolume (GUICtrlRead($Slider_1))
WEnd

 EndSelect
Wend

Func open()
$GUIActiveX      = GUICtrlCreateObj   ( $oIE,     2, 40 , 500 , 300 )
$oIE.navigate("www.google.com")
EndFunc

well here we have the slider working for the volume all good but,

#include <GUIConstants.au3>
#include <INet.au3>
GuiCreate("MyGUI", 750, 400,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS,))
GUISetBkColor(0x313594)
$oIE = ObjCreate("Shell.Explorer.2")
$Date_4 = GuiCtrlCreateDate("Date1", 200, 0, 190, 20)
$Slider_1 = GuiCtrlCreateSlider(0, 345, 200, 40)
$List_6 = GuiCtrlCreateList("Play List", 512.5, 40, 180, 317.5)
$Button_7 = GuiCtrlCreateButton("previous", 0, 0, 60, 20)
$Edit_8 = GuiCtrlCreateEdit("Edit6", 150, 240, 1, 1)
$Button_9 = GuiCtrlCreateButton("play/pause", 60, 0, 60, 20)
$Edit_10 = GuiCtrlCreateEdit("Edit8", 130, 230, 1, 1)
$Button_11 = GuiCtrlCreateButton("next", 120, 0, 60, 20)
$Button_14 = GuiCtrlCreateButton("stop", 0, 20, 60, 20)
$Checkbox_15 = GuiCtrlCreateCheckbox("Mute", 120, 20, 60, 20)
$b = GUICtrlCreateButton("HitKast", 60, 20, 60, 20)
GUISetState()  ;Show GUI

; Waiting for user to close the window
While 1
   $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $b
         open()

 EndSelect
Wend

Func open()
$GUIActiveX      = GUICtrlCreateObj   ( $oIE,     2, 40 , 500 , 300 )
$oIE.navigate("www.google.com")
EndFunc

and here we have the hitkast botton open the Internet, but i want them both to work not sure what to do hehe, and all the other control's don't work either Yet.


Thanks in advance

Share this post


Link to post
Share on other sites



oh and you have any ideas to make this better, or something to include please do so. next problem i have to look into is getting to play list, to allow to people to drop music in it and what not


Thanks in advance

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

tell me again why u have it calling a function instead of putting simple code like going to google just right after the case? and if u want to make it better go look at some examples in scripts and scraps there are PLENTY in there that play video and have all the stuff u want to do in it already

EVER HEARD OF EXITLOOOOOOOOOOOOOOOOOP

Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

I just cleaned up the code a bit and both work

#include <GUIConstants.au3>
#include <INet.au3>
GuiCreate("MyGUI", 750, 400,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
GUISetBkColor(0x313594)
$oIE = ObjCreate("Shell.Explorer.2")
$Date_4 = GuiCtrlCreateDate("Date1", 200, 0, 190, 20)
$Slider_1 = GuiCtrlCreateSlider(0, 345, 200, 40)
$List_6 = GuiCtrlCreateList("Play List", 512.5, 40, 180, 317.5)
$Button_7 = GuiCtrlCreateButton("previous", 0, 0, 60, 20)
$Edit_8 = GuiCtrlCreateEdit("Edit6", 150, 240, 1, 1)
$Button_9 = GuiCtrlCreateButton("play/pause", 60, 0, 60, 20)
$Edit_10 = GuiCtrlCreateEdit("Edit8", 130, 230, 1, 1)
$Button_11 = GuiCtrlCreateButton("next", 120, 0, 60, 20)
$Button_14 = GuiCtrlCreateButton("stop", 0, 20, 60, 20)
$Checkbox_15 = GuiCtrlCreateCheckbox("Mute", 120, 20, 60, 20)
$b = GUICtrlCreateButton("HitKast", 60, 20, 60, 20)
GUISetState() ;Show GUI

; Waiting for user to close the window
While 1
   $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $b
            open()
        Case $Slider_1 
            SoundSetWaveVolume (GUICtrlRead($Slider_1))
    EndSelect
Wend

Func open()
$GUIActiveX = GUICtrlCreateObj( $oIE,     2, 40 , 500 , 300 )
$oIE.navigate("www.google.com")
EndFunc


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

yes but with urs razer its not in real time so it wont continualy check the sound u have to stop to here the sound change

Share this post


Link to post
Share on other sites

if i understand you correctly you mean the volume doesnt change until you stop the music?


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

no till u stop moving the slider the volume wont change

Share this post


Link to post
Share on other sites

mine changes AS the slider moves


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

.... R U JOKING me i seriously did that on my music player and it didnt work :think: i feel stupid rihgt now

Share this post


Link to post
Share on other sites

i was playing a song in windows media player and it worked


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

well evil if u want to take a look at next and previous song this is what i did for next and previous, and seriously u have got to name ur god damn variables jesus

#include <GUIConstants.au3>
#include <INet.au3>
GuiCreate("MyGUI", 750, 400,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
GUISetBkColor(0x313594)
$oIE = ObjCreate("Shell.Explorer.2")
$Date = GuiCtrlCreateDate("Date1", 200, 0, 190, 20)
$volume = GuiCtrlCreateSlider(0, 345, 200, 40)
$playlist = GuiCtrlCreateList("Play List", 512.5, 40, 180, 317.5)
$previous = GuiCtrlCreateButton("previous", 0, 0, 60, 20)
$edit = GuiCtrlCreateEdit("Edit6", 150, 240, 1, 1)
$play = GuiCtrlCreateButton("play/pause", 60, 0, 60, 20)
$Edid8 = GuiCtrlCreateEdit("Edit8", 130, 230, 1, 1)
$next = GuiCtrlCreateButton("next", 120, 0, 60, 20)
$stop = GuiCtrlCreateButton("stop", 0, 20, 60, 20)
$mute = GuiCtrlCreateCheckbox("Mute", 120, 20, 60, 20)
$b = GUICtrlCreateButton("HitKast", 60, 20, 60, 20)
GUISetState();Show GUI

; Waiting for user to close the window
While 1
   $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $play
        $song = FileOpenDialog("Music","c:\","Music(*.mp3)")
        SoundPlay($song)
        Case $msg = $b
            open()
        Case $volume
            SoundSetWaveVolume (GUICtrlRead($volume))
    EndSelect
Wend

Func open()
$GUIActiveX = GUICtrlCreateObj( $oIE,     2, 40 , 500 , 300 )
$oIE.navigate("www.google.com")
EndFunc

;----------------------NEXT SONG----------------
        Case $msg = $Next
            If $linenumber <> _FileCountLines($playlistpath) Then
                $linenumber = $linenumber + 1
                $line = FileReadLine($playlistpath, $linenumber)
                FileDelete($songlistpath)
                _FileCreate($songlistpath)
        
                FileWrite($songlistpath, $line & @CRLF)
                Soundplay ($line)
            Endif
;------------------END NEXT SONG-----------------------
;-----------------PREVIOUS SONG--------------
        Case $msg = $previous
            If $linenumber > 1 Then
                $linenumber = $linenumber - 1
                $line = FileReadLine($playlistpath, $linenumber)
                FileDelete($songlistpath)
        
                _FileCreate($songlistpath)
                FileWrite($songlistpath, $line & @CRLF)
                soundplay($line)
            Endif
Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

thanks guys Perfect, now I need to make my play list box, a drop box, so I can add my music there and if clicked on it will change the songs thanks ill try figuring that out but if you know how and have time please tell me how to make my life easyer lol. thanks again


Thanks in advance

Share this post


Link to post
Share on other sites

i dont think its possible to pause the song using autoit natively however maybe using dllcall (i don't know which dll)


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

i dont think its possible to pause the song using autoit natively however maybe using dllcall (i don't know which dll)

hehe Im so cheap when people push pause, it will set volume to 0 :think:


Thanks in advance

Share this post


Link to post
Share on other sites

$WS_EX_ACCEPTFILES 0x00000010 Allow an edit or input control within the created GUI window to receive filenames via drag and drop. The control must have also the $GUI_DROPACCEPTED state set by GUICtrlSetState

Share this post


Link to post
Share on other sites

but the whoel point is to pause the thing so when they come back and press play it will start where they paused it not just mute it

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

but the whoel point is to pause the thing so when they come back and press play it will start where they paused it not just mute it

oh yea forgot bout that part hehe :">

well on my keyboard ther is a pause botton and it works for more then just windows media player, it works for winamp, and everything esle so Im thinking there must be a XP command, or something

Edited by Evil_Has_Survived

Thanks in advance

Share this post


Link to post
Share on other sites

oh yea forgot bout that part hehe :">

well on my keyboard ther is a pause botton and it works for more then just windows media player, it works for winamp, and everything esle so Im thinking there must be a XP command, or something

My keyboard also has a pause/play button.


My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

$WS_EX_ACCEPTFILES 0x00000010 Allow an edit or input control within the created GUI window to receive filenames via drag and drop. The control must have also the $GUI_DROPACCEPTED state set by GUICtrlSetState

can you show me how i would put this in my script please, if you have time, I would try and do it, but it's dinner time, and I would prob mess it up anyways thanks.

oh and if you are willing to help me :(

this might help incase you don't exactly know what to do, but I bet you do :think:

#include <GuiConstants.au3>
Opt("GUIoneventmode",1)
Opt("OnExitFunc","_write")
Global $songname[500]
Global $song[500]
Global $songGUI[500]
Global $number
;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
GuiCreate("Media Player", 336, 168,(@DesktopWidth-336)/2, (@DesktopHeight-168)/2,-1,0x00000018)
$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)
$Buttonstop = GuiCtrlCreateButton("Stop", 120, 60, 30, 30)
$Buttonadd = GuiCtrlCreateButton("Add", 150, 60, 30, 30)
GUICtrlSetData($Slider,100)
GUICtrlSetLimit ($Slider,100,0)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GuiCtrlSetOnEvent($ButtonPlay, "_Play")
GuiCtrlSetOnEvent($Buttonstop, "_Stop")
GuiCtrlSetOnEvent($Buttonadd, "_Add")
GuiSetState()

While 1
    SoundSetWaveVolume (GUICtrlRead($slider))
WEnd

Func _Exit()
    Exit
EndFunc
Func _play()
    $song = StringSplit (GUICtrlRead($input), "|")
    if $song[0] = 1 Then
    SoundPlay($song[1])
Else
    SoundPlay($song[2])
EndIf
EndFunc
Func _Stop()
    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
Edited by Evil_Has_Survived

Thanks in advance

Share this post


Link to post
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
Sign in to follow this  
Followers 0