setting the default folder to the folder where the stack is..
Devin Asay
devin_asay at byu.edu
Thu Dec 13 11:31:00 EST 2001
At 7:44 AM -0800 12/13/01, Niklas wrote:
>How do you set the default folder to the same folder
>where the stack is?
>I suppose its just to use "the filename of this stack"
>and remove the filename..?
>I am using the starterkit. so if its possible to do it
>with two statements, that would be grand!
>/Niklas
I often put this function into my stack script to provide a simple
way to get the path to the current folder:
function getPath stackPath
set the itemDelimiter to "/"
delete first item of stackPath
delete last item of stackPath
return "/" & stackPath
end getPaths
Then call the function like this:
put getPath(the long name of this stack) into pathName
or
set the defaultFolder to getPath(the long name of this stack)
Devin
--
Devin Asay
Humanities Research Center
Brigham Young University
More information about the use-livecode
mailing list