hi everybody,
I am about to write a script, that automacically generates artis playlists for all mp3's on a synched flashdrive.
There is one missing bit to it, how am I ablte to get the actual driveletter of the removable drive.
I currently only find the mediID string (looks very windows device'ish).
I've spent hours now to work through the api .but had no success so far.
any suggestions ?
please help
urgent help: find out the drive letter of the flashdisk
Moderators: Gurus, Addon Administrators
Re: urgent help: find out the drive letter of the flashdisk
http://www.mediamonkey.com/wiki/index.p ... riveLetter
It returns a long so you need to to add 65 to it and use Chr() to get the actual letter:
DriveLetterStr=Chr(Media.DriveLetter+65)
But what do you start with, MediaID , serialnumber or something else?
It returns a long so you need to to add 65 to it and use Chr() to get the actual letter:
DriveLetterStr=Chr(Media.DriveLetter+65)
But what do you start with, MediaID , serialnumber or something else?
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
-
tutenchamun
Re: urgent help: find out the drive letter of the flashdisk
hm ... need to to think about it ...
I started of, selecting the device in the treenode manually - then start the script and figure it all out through the actual selected node ... and do a view sql statements - it is all there in the db apart from the drive letter ... thats then where i hung ...
I had it all working already, as earlier versions had the drive-letter within brackets under the node-caption - thats gone now ... so ...
I#ll get back to here as soon as found a way.
thanks so far
I started of, selecting the device in the treenode manually - then start the script and figure it all out through the actual selected node ... and do a view sql statements - it is all there in the db apart from the drive letter ... thats then where i hung ...
I had it all working already, as earlier versions had the drive-letter within brackets under the node-caption - thats gone now ... so ...
I#ll get back to here as soon as found a way.
thanks so far
-
Guest
Re: urgent help: find out the drive letter of the flashdisk
im not at all getting there ... the media object is of no use, if I cannot find out how to instaciate it with the currently selected device and then access it.
I#m thinking to go through MyComputer and search for the device caption and then extract the driveletter.
I do not want to believe that this all would not work easier ... I just cant find the right api calls.
I#m thinking to go through MyComputer and search for the device caption and then extract the driveletter.
I do not want to believe that this all would not work easier ... I just cant find the right api calls.
Re: urgent help: find out the drive letter of the flashdisk
SDBDevice or SDBDeviceList ?
-
Guest
Re: urgent help: find out the drive letter of the flashdisk
... i now did exactly that, browse through the mycomputer child nodes searching for the caption of the selected removeable media ... extract the DriveLetter from this nodes caption and use it ... fine ... works
still, I have the feeling, there is an api call doing this ... I just couldnt figure it out ...
still, I have the feeling, there is an api call doing this ... I just couldnt figure it out ...
-
Guest
Re: urgent help: find out the drive letter of the flashdisk
--- I tried the SDBDevie and List, but this does not contain the DriveLetters.
Iterating through the Devices, I found the ID's, but no letters, even the DriveLetterIndex of all disks is "-1" - apart from one USB controller - "8"
Iterating through the Devices, I found the ID's, but no letters, even the DriveLetterIndex of all disks is "-1" - apart from one USB controller - "8"
Re: urgent help: find out the drive letter of the flashdisk
So try, Chr(8+65), I think that should give you the driveletter.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts