I'm too stupid :-(

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

I'm too stupid :-(

Post by onkel_enno »

Why does this not work?

Code: Select all

Dim Tracklist
Set Tracklist = CreateObject("SongsDB.SDBSonglist")
Tracklist.Add(SDB.Player.CurrentSong)
Please give ma a Hint! :oops:
Thanks in Advance
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

This way the song list's internal structures aren't properly initialized. Currently there isn't a way around it, always when you need a songlist you have to get it from some function. I'm not sure why exactly do you need it, but I suppose it might be needed sometimes and so I'll add a funciton for this for the next release.

Jiri
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

jiri wrote: I'm not sure why exactly do you need it, but I suppose it might be needed sometimes and so I'll add a funciton for this for the next release.
Jiri
Thanks Jiri, that would be fine :)

I needed it for a script which selectes either the selected files or the Player.CurrentSong and because Player.CurrentSong isn't a SongList I wanted to create a SongList with 1 Entry - so I wouldn't have to change the rest of the script.
I worked around with an array. :wink:
Last edited by onkel_enno on Mon Jul 11, 2005 3:47 am, edited 1 time in total.
saivert
Posts: 11
Joined: Tue May 10, 2005 4:33 pm
Location: Norway
Contact:

Dictionaries anyone??

Post by saivert »

Dictionaries anyone??

Dim d ' Create a variable.
Set d = CreateObject("Scripting.Dictionary")
d.Add "a", "Athens" ' Add some keys and items.
d.Add "b", "Belgrade"
d.Add "c", "Cairo"
...

Maybe jirij could use the Dictionary object instead of using his own list object. would be easier as he doesn't have to implement his own list object. The dictionary could consist of PLayListItem objects.
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

jiri wrote:I'm not sure why exactly do you need it, but I suppose it might be needed sometimes and so I'll add a funciton for this for the next release.
Jiri
Was there something done? I could need it again and can't find a way around it (need a Songlist of all Tracks in Library).
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

I just uploaded a new scripting help (see Developers page), there's NewSongList added.

Jiri
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

jiri wrote:I just uploaded a new scripting help (see Developers page), there's NewSongList added.

Jiri
You're the Best. Thanks

PS Are there now 2 SDBApplication Objects in help file?
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

I didn't want to open a new Thread so I put it in here.

Is there a possibility to add a Scrollbar into a Form or Panel?

Thanks for help
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

No, not yet, hopefully new UI elements will be added soon.

Jiri
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

Would be nice, thanks Jiri.

EDIT One last simple Question:
How to destroy a Control (f.e. a Checkbox on a Form)?
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

Again, I don't think it's possible now, you can only hide it. :cry:

Jiri
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post by onkel_enno »

jiri wrote:Again, I don't think it's possible now, you can only hide it. :cry:
Jiri
:cry:
But I'm sure, some time you will surprise me with new great methods :wink:
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Sorry, maybe I'm being dense, but how do you get the full list of tracks?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova »

Havent tried it but this should do the job:

SDB.Database.QuerySongs( 'ID=%')

Else this should work for sure

SDB.Database.OpenSQL( "SELECT ID FROM Songs")

Both methods should be used to return a SDBDBIterator object

See MM scripting help under ISDBDatabase
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

How do you show a checkbox on a form?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply