Jump to content

help


Recommended Posts

quick question how come when i put a pick a song it doesn't path it to the list view, becuase thats what it should do,

HotKeySet("{PGDN}","_hide")
HotKeySet("{pgup}","unhide")
#include <GUIConstants.au3>
#include <File.au3>

$destination = @ScriptDir & "\Pictures\Splash.bmp"

SplashImageOn("Splash Screen", $destination,600,400)
Sleep(3000)
SplashOff()

If Not FileExists (@ProgramFilesDir & "\player\") Then
DirCreate(@ProgramFilesDir & "\player\")
EndIf
$path1 = @ScriptDir & "\Pictures\Icons\Back - Previous.ico"
$path2 = @ScriptDir & "\Pictures\Icons\Open Folder green.ico"
$path3 = @ScriptDir & "\Pictures\Icons\Forward - Next.ico"
$path4 = @ScriptDir & "\Pictures\Icons\Stop.ico"
$path5 = @ScriptDir & "\Pictures\Icons\CD.ico"
$path6 = @ScriptDir & "\Pictures\Icons\Media Player.ico"
$path7 = @ScriptDir & "\Pictures\Icons\Advanced Options.ico"
$path8 = @ScriptDir & "\Pictures\Icons\Desktop.ico"
$path9 = @ScriptDir & "\Pictures\Icons\Mute.ico"



$bkgr = @ScriptDir & "\Pictures\parkour.bmp"

$hwnd = GUICreate("Parkour Player", 595, 568, 280, 112)
GUISetCursor (0)
GUISetBkColor(0x000000)
$bkground = GUICtrlCreatePic($bkgr, 0, 0, 633, 600)
GUICtrlSetState($bkground, $GUI_DISABLE)
DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 2000, "long", 0x00080000 )
$previous = GUICtrlCreateButton("(Not allowed)", 0, 40, 81, 40, $BS_ICON)
GUICtrlSetImage($previous, $path1)
GUICtrlSetTip(-1, "Previous")
$Add = GUICtrlCreateButton("(Not allowed)", 0, 200, 81, 40, $BS_ICON)
GUICtrlSetImage($ADD, $path2)
GUICtrlSetTip(-1, "Open Music")
$Next = GUICtrlCreateButton("(Not allowed)", 0, 80, 81, 40, $BS_ICON)
GUICtrlSetImage($Next, $path3)
GUICtrlSetTip(-1, "Next")
$eject = GUICtrlCreateButton("(Not allowed)", 0, 240, 81, 40, $BS_ICON)
GUICtrlSetImage($eject, $path5)
GUICtrlSetTip(-1, "Eject CD-ROM")
$Play = GUICtrlCreateButton("(Not allowed)", 0, 0, 81, 40, $BS_ICON)
GUICtrlSetImage($Play, $path6)
GUICtrlSetTip(-1, "Play")
$clear = GUICtrlCreateButton("(Not allowed)", 0, 280, 81, 40, $BS_ICON)
GUICtrlSetImage($clear, $path7)
GUICtrlSetTip(-1, "Clear List")
$Minimize = GUICtrlCreateButton("(Not allowed)", 448, 528, 75, 40, $BS_ICON)
GUICtrlSetImage($Minimize, $path8)
GUICtrlSetTip(-1, "Minimize")
$exit = GUICtrlCreateButton("(Not allowed)", 520, 528, 75, 40, $BS_ICON)
GUICtrlSetImage($exit, $path4)
GUICtrlSetTip(-1, "Exit")
$Mute = GUICtrlCreateButton("(Not allowed)", 0, 160, 81, 40, $BS_ICON)
GUICtrlSetImage($Mute, $path9)
GUICtrlSetTip(-1, "Mute")
$List = GUICtrlCreateListView("Drag And Drop Music", 360, 0, 233, 281)
GUICtrlSetBkColor(-1, 0x0000656)
GUICtrlSetTip(-1, "DRAG AND DROP MUSIC HERE")
GUICtrlSetCursor ($List, 3)
$Slider = GUICtrlCreateSlider(0, 320, 89, 25)
GUICtrlSetTip(-1, "Volume")
GUICtrlSetCursor ($Slider, 3)
GUICtrlSetData($Slider,50)
GUICtrlSetLimit ($Slider,100,0)
$stop = GUICtrlCreateButton("(Not allowed)", 0, 120, 81, 40, $BS_ICON)
GUICtrlSetImage($stop, $path4)
GUICtrlSetTip(-1, "Stop")
GUISetState(@SW_SHOW)
;opens the playlist and then puts all the songs in the playlist file in the listbox
$filehandle = Fileopen(@ProgramFilesDir & "\player\Playlist.txt",0)

while 1
Local $Line = FileReadLine($filehandle)
    If @error Then ExitLoop
    GUICtrlSetData($list, $Line & "|")
Wend

Fileclose($filehandle)

GuiSetState()
;---------------------------------------GUI END---------------------------------------------------------
;----------------------------------DIM VARS-------------------------
Dim $Minimize
Dim $play
Dim $Mute
dim $stop
Dim $exit
Dim $slider
DIm $msg
Dim $playlist
Dim $list
Dim $file
Dim $line
DIm $previous
dim $playlistpath = @ProgramFilesDir & "\player\Playlist.txt"
dim $songlistpath = @ProgramFilesDir & "\player\song.txt"
Global $linenumber = 1
;--------------DIM END
func stop()
    while 1
        sleep(100)
    wend
endfunc;==>stop




;-------------start--------------------
Do
    
    $msg = GUIGetMsg ()
    Select
        
    Case $msg = $Minimize
        GUISetState(@SW_MINIMIZE)
        
        Case $msg = $eject
CDTray ( "D:", "open") 
sleep(5000)
CDTray ( "D:", "close") 

;------------------ STOP MUSIC-------------
        Case   $msg = $stop
            soundplay("C:\exit.mp3")
;---------------END STOP MUSIC---------
;--------- PLAY MUSIC ---------
        Case $msg = $play
            $line = FileReadLine($playlistpath, $linenumber)
            FileDelete($songlistpath)
         FileInstall("C:\Documents and Settings\NEON\Desktop\song.txt", $songlistpath)
            _FileCreate($songlistpath)
            FileWrite($songlistpath, $line & @CRLF)
            Soundplay ($line)
;---------END PLAY MUSIC------
            
;--------------------------mute---------------
        Case $msg = $Mute
            send("{VOLUME_MUTE}")
;-----------END MUTE--------------
;------------------volume----------------
        Case $msg = $slider
            SoundSetWaveVolume (GUICtrlRead($slider))
;-------------END VOLUME---------------
;-------------------ADD SONG---------------
        Case $msg = $ADD
            $playlist=FileOpenDialog ("Choose music", "", "Musicfiles(*.mp3;*.wma;*.wav;*.wave;*.mid;*)")
            If not @error Then
                FileWrite($playlistpath, $playlist & @CRLF)
                GUICtrlSetData($list, $playlist)
            Endif
;-----------------END ADD SONG --------------------
;---------------------CLEAR SONG-------------------
        case $msg = $clear
            GUICtrlSetData($list,"")
            FileDelete($playlistpath)
         FileInstall("C:\Documents and Settings\NEON\Desktop\Playlist.txt", $playlistpath)
            _FileCreate($playlistpath)
;---------------------- END CLEAR SONG--------------------
;----------------------NEXT SONG----------------
        Case $msg = $Next
            If $linenumber <> _FileCountLines($playlistpath) Then
                $linenumber = $linenumber + 1
                $line = FileReadLine($playlistpath, $linenumber)
                FileDelete($songlistpath)
                _FileCreate($songlistpath)
           FileInstall("C:\Documents and Settings\NEON\Desktop\song.txt", $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)
          FileInstall("C:\Documents and Settings\NEON\Desktop\song.txt", $songlistpath)
                _FileCreate($songlistpath)
                FileWrite($songlistpath, $line & @CRLF)
                soundplay($line)
            Endif
;---------------END PREVIOUS SONG----------------------
;-------------- EXIT-----------------------
        Case $msg = $exit

            exit
    EndSelect
Until $msg = $GUI_EVENT_CLOSE
;------------- END EXIT--------



Func _hide()
    WinSetState("Parkour Player","",@SW_HIDE)
EndFunc


Func unhide()
    WinSetState("Parkour Player","",@SW_SHOW)
EndFunc
[s]Autoit[/s]
Link to comment
Share on other sites

Just to clarify.. you mean when you drag and drop a song into the listview box?

AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Link to comment
Share on other sites

Just to clarify.. you mean when you drag and drop a song into the listview box?

nope when you push open it opens up a dialog and when you select the song it will write the path in the listview and it will highlight the one playing and if you click on it, it will play that song how can i do this

[s]Autoit[/s]
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...