The Daily Click ::. Forums ::. Klik Coding Help ::. File object vs common dialog object
 

Post Reply  Post Oekaki 
 

Posted By Message

EleXor



Registered
  21/01/2003
Points
  269
3rd September, 2005 at 04:17:22 -

Hi plz. I am experimenting with file object & common diablog object. I created a little musicplayer that supports .mid and .mp3 for only now.
I done the 'open file' with file object, it looks ok and everything works.
BUT, I can't do the operation 'add filename to the playlist, not the whole path'.
Of course common dialog can only add the tittle / file name, but I don't get extensions work (it says MP3 files, and I am on mp3 folder, though it doesn't show any files)... So does anybody know, how do you get extensions / filters work with the common dialog object?

Oh and drag and drop thing for the playlist:
I tested it and you can drag there eg. picture.png. So how the hell you do 'file is .mp3 or .mid' for the drag and drop?

List object: I set base colour to blue and wanted to find option to add a red line in it. Instead you can only change all the colours. How I am supposed to add one different coloured line?

k thx lol

 
n/a

Crystal Clear (H.E.S)

Possibly Insane

Registered
  06/10/2002
Points
  2548
3rd September, 2005 at 08:43:14 -

Hopefully this should answer some of your questions.

------------------------------------------
Adding filters using Common Dialog Object
------------------------------------------

Start of Frame --> Add filter "MP3" for "*.MP3"

--------------
Drag And Drop:
--------------
***Add two Edit objects, just place them outside the screen/playfield.***

On Files Dropped --> Set Edittext to: Dropped$( 0 )
Set Edittext2 to: Right$( Edittext$( "Edit" ), 3 )
Compare Two General Values --> Right$( Edittext$( "Edit" ), 3 ) = "mp3"
Add a line(list): Edittext$( "Edit" ) *This is your songtitle your adding to the playlist*
Set Editext to: ""
Set Editext2 to: ""

You'll probably have to customise them a bit, that only works by dragging and dropping one file, if you select multiple files then thatll be a bit more tricky, but should be easily accomplished by doing some sort of loop.

Image Edited by the Author.

 
HES homepage:
http://www.distinctiv-efair.com/heretic/studios
Crystal Clear Productions: http://www.distinctiv-efair.com/heretic/crystalclear

EleXor



Registered
  21/01/2003
Points
  269
3rd September, 2005 at 10:37:13 -

That works fine, thank you!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click