My script needs a Framemaker template file in creating a new file. I've made it work by hard-coding the path to the template in the script:
sFilename = "C:\\Users\\gisteppen\\Desktop\\fm change bars\\dev\\changes-template.fm";
I want to make this easy to distribute. I want the script to look for this template file in whatever directory the script resides in, but I find it won't work if I just put the name of the template without the path like this:
sFilename = "changes-template.fm";
Is there a way to get the current directory where the script is from the file system? Then I could construct the absolute path that Fm seems to need.
Or maybe there is a better way to go about this?
Thanks,
Mark