Stack file opened message?

Bob Sneidar bobs at
Wed Jul 18 19:10:31 EDT 2012

Sorry let's try again without the global I was using for testing: 

-----insert the following into front scripts

local theLastOpenedStackName, theLastOpenedStackPath, theLastOpenedFileName

ON openStack
   put the short name of this stack into theLastOpenedStackName
   put word 6 to -1 of the long name of the target into theLastOpenedStackPath
   replace quote WITH empty in theLastOpenedStackPath
   put theLastOpenedStackPath into theLastOpenedFileName
   replace "/" WITH cr in theLastOpenedFileName
   delete line 1 to -2 of theLastOpenedFileName
   pass openStack
END openStack

FUNCTION getLastStackInfo whichParameter
  SWITCH whichParameter
     CASE ""
        put theLastOpenedStackName into theResult["stackname"]
        put theLastOpenedStackPath into theResult["path"]
        put theLastOpenedFileName into theResult["filename"]
     CASE "stackname"
        put theLastOpenedStackName into theResult
     CASE "path"
        put theLastOpenedStackPath into theResult
     CASE "filename"
        put theLastOpenedFileName into theResult
        put empty into theResult
  return theResult
END getLastStackInfo

-----end of front scripts

More information about the Use-livecode mailing list