ZBrushCentral

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

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.