news |
info |
people |
software |
stuff |
This routine looks for the file first in the Preferences folder in the ULTRALAB folder, within the current system folder.
If it can't find it there, it also looks in the normal system preferences folder.
If it finds the file somewhere, it returns the path to it. If it can't find it, it returns the path where the file should be created, which will be in the ULTRALAB preferences folder.
function FL_FindPrefs name -- look for file in ULTRALAB folder first put FindFolder("system folder") & "ULTRALAB:Preferences:" & name into preferredPath -- if it's there, return that as path if there is a file preferredPath then return preferredPath end if -- otherwise, look in the proper preferences folder put FindFolder("preferences") & name into otherPath -- if its there, return that path if there is a file otherPath then return otherPath else -- file doesn't exist, so make sure its created in the preferred place return preferredPath end if end FL_FindPrefs