Quote Originally Posted by relaxedromance View Post
I'm trying to export separate layers too. So far, I have the script below, and it's working OK. It exports only named layers. The script is so simple, I'm amazed this function is not built in!

If anyone knows how to get the current painting's filename and path as the baseName, or some other way I can replace the InputBox with something more elegant, help would be much appreciated.
Function Name
Function declaration
Description
Example
=======================

Name

string Name()

Return the filename of the file. This is set when the file is opened (either with Open() or with the file dialogs)

s = filDoc.Name()
filDoc.LoadDialog();
if (filDoc.Name() == “fish.txt”)...

-----------------------------------------------------

FullPath

string FullPath()

Returns the full path including the name of the file. This is set when the file is opened (either with Open() or with the file dialogs)

s = filDoc.FullPath();
filDoc.SaveDialog(“Scores.txt”);
if (filDoc.FullPath() == sOld) ...