specialFolderPath("Preferences") for window

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

specialFolderPath("Preferences") for window

Post by jmburnod » Thu Jul 14, 2011 10:19 am

Hi All,

Which is the equivalent of specialFolderPath("Preferences") for window and Linux
I think "home" it is correct ?

Al the best

Jean-Marc
https://alternatic.ch

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: specialFolderPath("Preferences") for window

Post by SparkOut » Thu Jul 14, 2011 11:22 am

"home" would be pretty much the equivalent of the "home" folder reference on a Mac. If that is suitable then yes, you could use it. Otherwise if you are talking more like the "asup" application support folder in the user's libraray, then on Windows at least you would probably find the nearest match is to use specialFolderPath(26) or specialFolderPath(28) for the Application Data folder, whether roaming or local. I don't know what any equivalent in Linux would be.
The dictionary gives a link to the Microsoft site which tells what they are (which seems currently to be down), but Ken Ray has the specialFolderPath Codes "bible" here http://www.sonsothunder.com/devres/revo ... ile010.htm

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: specialFolderPath("Preferences") for window

Post by jmburnod » Thu Jul 14, 2011 11:42 am

Hi Sparkout,

Thank for your quick and documented reply.

All the best

Jean-Marc
https://alternatic.ch

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: specialFolderPath("Preferences") for window

Post by jacque » Thu Jul 14, 2011 8:16 pm

Actually, specialFolderPath("preferences") works on Windows. It points to the right place in the user data folder.

On Linux it is customary to just use ~/.myapp/ (don't use specialFolderPath.) The dot makes the app folder invisible, which is usually how apps do it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: specialFolderPath("Preferences") for window

Post by SparkOut » Thu Jul 14, 2011 8:37 pm

jacque wrote:Actually, specialFolderPath("preferences") works on Windows. It points to the right place in the user data folder.
If that were true, it would be nice if the dictionary said so. But it certainly doesn't give me a path on Windows (7 - not tested on any other versions lately but I'm pretty sure I never got a path from attempts to try "preferences" back on my XP machine when I was green).

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: specialFolderPath("Preferences") for window

Post by jacque » Thu Jul 14, 2011 9:31 pm

Hmm...looks like you're right. I just checked some old code and I'm using specialFolderPath(26) for Windows. I hate when I do that. :(
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: specialFolderPath("Preferences") for window

Post by FourthWorld » Thu Jul 14, 2011 10:17 pm

On Windows I use specialFolderPath(26)

http://sonsothunder.com/devres/revoluti ... ile010.htm
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: specialFolderPath("Preferences") for window

Post by SparkOut » Thu Jul 14, 2011 11:50 pm

Aye, me too, as intimated above.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: specialFolderPath("Preferences") for window

Post by jmburnod » Fri Jul 15, 2011 10:19 am

Hi All,
Thank for reply.
They are very useful for a windows baby and i'am one.

All the best

Jean-Marc
https://alternatic.ch

Post Reply