I'd like to save my preferences in separate folder

G’day

Another curly question.

I’ve finished my first app built in Applescript ObjC. Quite please with it, so thanks for the help folks. However, all my previous apps save their preferences in a separate folder call ‘MeSelf’ in the prefs folder.

As usual, googling gives me nothing to go by.

Is this possible? Some preferences are automatic, some are save manually in the same prefs file. Any thoughts on the subject please?

Regards

Santa

Hi,

it might be easier to reconsider your proprietary saving convention :wink:

BIG GRIN Thanks Stefan, but I love a challenge, so will pursue the topic and post if I find an answer.

Regards

Santa

BIGGER GRIN

Turned out to be trivial.

First, create your folder in the preferences folder with…


on applicationWillFinishLaunching_(aNotification)
		-- Insert code here to initialize your application before any files are opened 
		set thePListFolderPath to path to preferences folder from user domain as text
		set theNewthePListFolderPath to thePListFolderPath & "Meself"
		tell application "Finder"
			if not (exists folder theNewthePListFolderPath) then make new folder at thePListFolderPath with properties {name:"MeSelf"}
		end tell
		

Next, open the Targets in the main Xcode window, then open your project name.

In the resultant Target Info box click on Properties then change the path name to a Posix Path pointing to your folder, so…

MeSelf/com.MeSelf.Mail Manager Reporter

Regards

Santa