Preferences files
Mark Brownell
gizmotron at earthlink.net
Thu Jan 22 16:42:41 EST 2004
On Thursday, January 22, 2004, at 12:56 PM, Thomas J McGrath III wrote:
> If I ask the user to save a Pref file somewhere on their machine then
> what is the best way to get that file loaded next time they run the > CD?
> The CD is meant for cross-platform distribution.
Thomas,
I do this:
if the platform is "MacOS" then
put specialFolderPath("preferences") into regStatGoPath
put regStatGoPath & "/yourpref.txt" into itX
if there is a file itX then
put URL ("file:" & itX )) into temp
-- put decompress(URL ("binfile:" & itX )) into temp
else
-- do something here to create one
end if
end if
if the platform is "Win32" then
put specialFolderPath("system") into regStatGoPath
put regStatGoPath & "/yourpref.txt" into itX
if there is a file itX then
put URL ("file:" & itX )) into temp
-- put decompress(URL ("binfile:" & itX )) into temp
else
-- do something here to create one
end if
end if
I would also add base64 for your cross-platform distribution.
Mark
More information about the use-livecode
mailing list