directory of indigo

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
Forum rules
This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

directory of indigo

Post by kw123 »

Is there a variable that contains the directory where indigo is stored. i.e.
/Library/Application Support/Perceptive Automation/Indigo 3 4 5 6

would like to write a file into the script library and don't want to manually change directories when versions change.

thanks

Karl
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: directory of indigo

Post by matt (support) »

Hi Karl,

No, there isn't. Normally for scripts like that I just have it check multiple folders until it finds one (starting with a high number).
Image
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: directory of indigo

Post by jay (support) »

Another option, if you keep your database file in the Databases folder, is to use this IOM server method to get the full path to the db file:

Code: Select all

indigo.server.getDbFilePath()
That will return a string that's the full unix path to the db file - just strip the "Databases/DBNAME.indiDb" off the end and you should have the path to the prefs folder.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: directory of indigo

Post by matt (support) »

Clever idea, Jay. :-)
Image
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: directory of indigo

Post by kw123 »

could you translate this into applescript... not at python level yet...

thx
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: directory of indigo

Post by jay (support) »

Sorry, can't be done in AppleScript.

The next release (probably not until after the first of July) will have a method to get the path to the server's install folder (so you won't have to chop off the database specific bits).

[EDIT] which will still be Python only. We're not enhancing AppleScript (since Indigo 5).
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
Locked

Return to “Extending Indigo with Plugins and Python”