finding the folder of a standalone

Sarah Reichelt sarahr at
Thu Jan 10 19:20:01 EST 2002

In a standalone, use "the address". This returns "computer name:path of
current application".

In development mode, this gives you the path to the Revolution app so you
need to use a different method. Here is the script I use:

if the environment = "development" then
  put word 2 to -1 of the long name of \
    stack (the mainStack of this stack) into appPath
  replace quote with "" in appPath
  set the itemDel to ":"
  put item 2 of the address into appPath
end if

This returns the complete path to the application, so you need to strip off
the final section if you just want the folder name.


> Is this the only way to get the folder of the standalone application?
> on openStack
> local lFolder
> get matchText (the fileName of me , "^(.*)/[^/]+$" , lFolder )
> set the defaultFolder to lFolder
> end openStack
> Since you can not use relative path without setting the defaultFolder I
> would expect the defaultFolder to be set automaticaly.
> Is there any way to make this code part of every project without pasting
> it inside? 
> Nir Soffer
> --
> Email: nirs at
> ICQ:   98571424
> _______________________________________________
> use-revolution mailing list
> use-revolution at

More information about the use-livecode mailing list