directory of 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

Posted on
Thu Jun 13, 2013 11:17 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

directory of indigo

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

Posted on
Thu Jun 13, 2013 11:30 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: directory of indigo

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

Posted on
Fri Jun 14, 2013 9:07 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: directory of indigo

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

Posted on
Fri Jun 14, 2013 9:17 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: directory of indigo

Clever idea, Jay. :-)

Image

Posted on
Fri Jun 14, 2013 10:59 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: directory of indigo

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

thx

Posted on
Fri Jun 14, 2013 11:11 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: directory of indigo

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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests