finding the folder of a standalone
Sarah Reichelt
sarahr at genesearch.com.au
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
else
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.
Sarah
> 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 mac.com
> ICQ: 98571424
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list