Jump to content

Playlist drag.n.drop function.


spawnfestis
 Share

Recommended Posts

Hi there.

Ive been workin' on my classy "wont-take-too-much-ram-as-winamp&windowsmp-does"-mp3player.

--

Anyhow, ive been lookin' around for a playlist thats not too complicated and runs really nice.

Is there by any chance you guys could help me with this?

Heres my code! :P (Dont leech without cred's though :lmao: )

;run("rundll32 url.dll,FileProtocolHandler http://www.jimmyweb.se")
#include<GUIConstants.au3>

$sound="Press open to play file. Notice: volume is set to 100% Quality"
$edit=""
$width=460
$height=285

; Volume set to 100% -For maximum volume effects-
SoundSetWaveVolume(100)
GuiCreate("Fine mp3 - Smallest mp3player online! (  v.1.0  )",$width,$height,-1,-1,$WS_MAXIMIZEBOX + $WS_MINIMIZEBOX)
GUISetState(@SW_SHOW)

; Groupline Controlpanel
GuiCtrlCreateGroup("Controlpanel",5,0,445,100)

; ------------------------------- Buttons -------------------------------------
; Button Stop
$buttonstop=GuiCtrlCreateButton("Stop", 75, 20, 55,35,$BS_FLAT)
; Button Open
$open=GuiCtrlCreateButton("Open", 145,20,55,35,$BS_FLAT)
; Button Play
$play=GuiCtrlCreateButton("Play",10,20,55,35,$BS_FLAT)
; Static mp3-file changer
$edit=GuiCtrlCreateEdit($sound, 10,  60, 430, 16, $ES_READONLY, $WS_EX_STATICEDGE)
; Picture above commerical
$picture = GuiCtrlCreatePic("pic.jpg", 210, 8, 235, 50)
; ------------------------------- Buttons -------------------------------------

GuiCtrlCreateGroup("Playlist",5,100,445,155)

$mylist=GUICtrlCreateList ("First song", 10,120,200,120);, BitOR($WS_TABSTOP, $LBS_NOTIFY), $WS_EX_ACCEPTFILES )
GUICtrlSetState(-1, $GUI_ACCEPTFILES)
;GUICtrlSetState( -1, $GUI_DROPACCEPTED)

$add_line = GUICtrlCreateInput("", 10, 230, 200, 20);, -1,  $WS_EX_ACCEPTFILES )  
GUICtrlSetState(-1, $GUI_ACCEPTFILES)
;GUICtrlSetState( -1, $GUI_DROPACCEPTED)


While 1
      
$msg = GUIGetMsg()

  Select
        
;If GUI is closed do this:
        Case $msg = $GUI_EVENT_CLOSE
        MsgBox(0,"Alert","Successfully exited, go back to your business.")
        GUIDelete()
        Exit
    
;If GUI is minimized do this:
    Case $msg = $GUI_EVENT_MINIMIZE 
    MsgBox(0,"Alert","Successfully minimized, go back to your business.")

    Case $msg = $buttonstop
    SoundPlay("C:\NoFile1238467124910246.mp3")
    
    Case $msg = $open
    $sound=FileOpenDialog("Open Music File","C:\","All Files(*.*)",3)
    GUICtrlSetData($edit, $sound)

    Case $msg = $play
    SoundPlay($sound)

    
endselect

WEnd

As u guys see i wanna make it dropable and removeable.

Cant make it work though..

Help is appreciated :(:):)

Link to comment
Share on other sites

read the helpfile about Files (FileWrite, ...) or/and Inis (IniRead, ...). This could help you a lot... and if you want to drag it, theres a special style, but you can't drag jsut the label... you should add the file which is opened to the active playlist. sry, i'm very dizzy and tired at the moment, because it's 6am here and i'll write you again after sleeping :P

then with a better english, too xD

Link to comment
Share on other sites

read the helpfile about Files (FileWrite, ...) or/and Inis (IniRead, ...). This could help you a lot... and if you want to drag it, theres a special style, but you can't drag jsut the label... you should add the file which is opened to the active playlist. sry, i'm very dizzy and tired at the moment, because it's 6am here and i'll write you again after sleeping :P

then with a better english, too xD

Is there any possibility that u can help me doing this? got no sense whatever when it comes to this..

Link to comment
Share on other sites

what hes saying is when u have it add the song to the list have it write the location to the .ini and then have it read the .ini for the location of the first second third song blah im workin on one of these too playlist, and repeat and length of the song :-/ so i can use the repeat

Edited by thatsgreat2345
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...