Script Helper Methods

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

Teknojnky
Posts: 5533
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky » Tue Jan 31, 2006 4:01 pm

I beleive it checks the my music folder, as I have had it happen where previously existing profile had a mm ini in the my music folder and it took prioirty over the mm ini in the program folder.

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK
Contact:

Post by trixmoto » Tue Jan 31, 2006 4:33 pm

Can a MM developer help us out here please? We're going in circles!
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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

mockturtle
Posts: 8
Joined: Wed Jun 18, 2008 4:49 pm

Post by mockturtle » Tue Jan 31, 2006 4:36 pm

At first 'My Music\MediaMonkey' folder is checked, then 'Program Files\MediaMonkey' is used.

Jiri

Steegy
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium
Contact:

Post by Steegy » Tue Jan 31, 2006 5:22 pm

Then this will be the new code:

Code: Select all

' Returns the path to MediaMonkey's configuration (ini) file or "" if it doesn't exist
Function GetINIPath()

  GetINIPath = ""
  Dim INIPath_MyMusic, INIPath_Program, FSO

  INIPath_MyMusic = SDB.MyMusicPath & "MediaMonkey\MediaMonkey.ini"
  INIPath_Program = SDB.ApplicationPath & "MediaMonkey.ini"
  Set FSO = CreateObject("Scripting.FileSystemObject") 

  If FSO.FileExists(INIPath_MyMusic) Then
    GetINIPath = INIPath_MyMusic
  Else
    If FSO.FileExists(INIPath_Program) Then
       GetINIPath = INIPath_Program
    End If
  End If
   
End Function
Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).

psyXonova
Posts: 785
Joined: Fri May 20, 2005 3:57 am
Location: Nicosia, Cyprus
Contact:

Post by psyXonova » Wed Feb 01, 2006 3:57 am

I guess this is something that only one of the developers can answer. I also think that selecting ini based on the file size it is too risky. Perhaps it has something to do with the stored info inside. I have also checked the registry to see if i can come up with something but no luck. So, it must be the system section.

As for your idea Steegy i couldnt agree more with you, i strogly believe that using common vbs as "libraries" will help us all.

judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Post by judas » Wed Feb 01, 2006 9:17 am

trixmoto wrote: I thinik most script users (who are not script writers) prefer to have a single script file as it is easier for them to install.
Personally, I'm one of those (maybe?) :-) I've always liked the way Apple OS works...just drag and drop ONE file and there you go: program installed, so maybe this is something like that!.

This might be the most stupid thing in scripting terms youve hear but, seeing all you guys can do from a script, would it be hard if you:

1. Write a script assuming there are such libraries (as proposed in this forum)
2. Run a script (possible? no idea here) that just starts the script and then copies the function needed from the library in the right place
3. Post the new script...that's self contained!!

maybe is really hard to do, dont't know...but that would make it easy on you writing the script and wouldn't hurt usability nor ease of use (same thing?) for the common people like me?

if this is not possible to do (the script that copies functions), or is not what youre asking or makes things more complicated, then just ignore this!!!

CHEERS!!!


judas

winchendonsprings
Posts: 6
Joined: Wed Apr 29, 2009 9:05 pm

Re: Script Helper Methods

Post by winchendonsprings » Sat May 16, 2009 2:03 pm

i cannot get this script to install. you should do a step but step installation how to.
I think this script should be stock with MM.
how often do you end up with a compilation split up by artist instead of album.

EDIT: nevermind I went back and payed closer attention. thanks great script

Post Reply