specialfolderpath("preferences") on windows

Paul D. DeRocco pderocco at ix.netcom.com
Wed Apr 14 16:59:55 EDT 2010


> From: David Glasgow
>
> I wrote script to save a text file to
> specialFolderPath("Preferences")  and then reference it on
> subsequent startups.  I had planned to write an alternative bit
> of script for Windows using specialFolderPath(26), but hadn't
> quite got round to it.
>
> I am using Rev Studio on Mac, so I have to build check, build
> check etc. on Windows.  I built to check something else on
> Windows, only to find that the specialFolderPath("Preferences")
> script seems to be working.  (It's usually things I expect to
> work, not working, not the other way around, so this was an
> unusual experience).
>
> The file was saved, and found on subsequent startups.  So is
> specialFolderPath("Preferences") cross platform?  If so, where is
> it?  I tried searching for my file but couldn't find it.

No, it's not supported in Windows. Entering

	put specialFolderPath("Preferences")

in the message box returns nothing in Windows. So your file would have gone
into the root if you added a slash and your file name.

On advice from folks in the forum, I use specialFolderPath("asup") on the
Mac, and specialFolderPath(26) on Windows, and append a slash and my app
name, to get the name of the folder to put my app preferences in. If the
folder doesn't exist, I create it.

--

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at ix.netcom.com




More information about the use-livecode mailing list