GetExtensionsPath
Calculates the path in which to put plug-ins
Average rating: 4.1 (43 votes) Log in to vote
Jens Rasmussen Fimano http://fimano.dk/filemaker/toolbox.html |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
The Extensions folder next to the FileMaker app can be read-only if the user is not an admin on the actual machine. This path:
~/Library/Application Support/FileMaker/Extensions/
will take precedence over the aforementioned.
The word "Library" can be seen in local translations [Danish: Bibliotek].
Windows support now included, thanks to briandunning.com's bright users.
Comments
Max Heller, fmax software Dec 18, 2009 |
||
On windows, Get ( PreferencesPath ) returns: "/C:/Documents and Settings/USERNAME/Local Settings/Application Data/" and the Extensions path is: "C:\Documents and Settings\USERNAME\Local Settings\Application Data\FileMaker\Extensions" |
||
Max Heller, fmax software Dec 18, 2009 |
||
Here is a cross platform version: Let( [ prefPath = Get( PreferencesPath ); macExtensionPath = Substitute( prefPath; "/Preferences/"; "/Application Support/FileMaker/Extensions/" ); winExtensionPath = prefPath & "FileMaker/Extensions/"; path = If( Abs( Get( SystemPlatform ) ) = 1; macExtensionPath; winExtensionPath ) ]; path ) |
||
Bob Stuart, Noosa, Queensland Dec 20, 2009 |
||
I tried Max's code, as written, in a CF and got warning dialogs galore objecting to various things. So I simplified it to: If ( Abs ( Get ( SystemPlatform ) ) = 1 ; Substitute ( Get ( PreferencesPath ) ; "/Preferences/" ; "/Application Support/FileMaker/Extensions/" ) ; Get ( PreferencesPath ) & "FileMaker/Extensions/" ) |
||
Bob Stuart, Noosa, Queensland Jan 5, 2010 |
||
...and I've just realised that I've backwards-engineered Max's code to exactly what Jens wrote in the first place. Red Face. Apologies, Jens. Will this work in Vista and Win7 ? | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.