Stack file opened message?

Bob Sneidar bobs at twft.com
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"]
        break
     CASE "stackname"
        put theLastOpenedStackName into theResult
        break
     CASE "path"
        put theLastOpenedStackPath into theResult
        break
     CASE "filename"
        put theLastOpenedFileName into theResult
        break
     DEFAULT 
        put empty into theResult
  END SWITCH
  return theResult
END getLastStackInfo

-----end of front scripts





More information about the use-livecode mailing list