1. #1
    Senior Member Follow User Gallery
    Join Date
    Jul 2014
    Posts
    111

    Default Current project file

    Moving on from here I'm confused as to why Note and MessageOK give different results when they should be displaying the same string! :confused:


    [IButton, "What document?", "Extracts document name",
    [VarSet, currentZDoc, [FileNameExtract, [FileNameGetLastUsed], 2]]
    [VarSet, currentZDocPath, [FileNameGetLastUsed]]
    [Note, ,currentZDocPath, 2]
    [MessageOK, currentZDocPath]
    ]// EoF

    Cheers

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Well, your Note that is supposed to display the currentZDocPath variable is malformed (you have two commas before currentZDocPath) and your currentZDoc variable is set but not used.

    But note that this will display the file name of the last used file, which won't necessarily be the one you want. For example, if I load your script using ZScript>Load it displays the script name & path.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •