Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!njin!princeton!siemens!demon!fwb From: fwb@demon.siemens.com (Frederic W. Brehm) Newsgroups: comp.sys.mac.hypercard Subject: Re: How do I get the pathname? Message-ID: <14069@siemens.siemens.com> Date: 21 Aug 89 19:35:28 GMT References: <716@pmafire.UUCP> Sender: news@siemens.siemens.com Reply-To: fwb@demon.UUCP (Frederic W. Brehm) Organization: Siemens Corporate Research Lines: 17 In article <716@pmafire.UUCP> geoff@pmafire.UUCP (Geoff Allen) writes: ... lots of frustration deleted ... >How do I get the pathname to stack x (or the current stack) from within >a script. function whereStack -- returns the folder in which this stack lives -- The value of this function is the the same as the contents of -- the "Where:" field in "Stack Info..." under the "Objects" menu. -- second word of the long name of this stack is -- quote & FOLDER & short name of this stack & quote put second word of the long name of this stack into Name -- extract FOLDER from Name return char 2 to length(Name) - length(short name of this stack) - 1 of Name end whereStack