Thanks David, but that link is not a solution. You cannot use variables when specifying a path in the Export Records script step. I need to use the Export Records step to export records to a tab-separated text file on the users' desktop. To save the path location as part of the script, you need to enter a literal path within a dialog box which does not accept variables.
This worked just fine in FMP6 where you just told the Export step to automatically save to the desktop and it saved to the desktop on EVERYONE's computer, but in FMP8.5 it saves it to the ABSOLUTE path, and since everyone's hard drive has a different name, the script fails. I need a RELATIVE path to the desktop so that I can store that string into the Path dialog in the Export script step.
This seems like such a simple thing to do, and I've found quite a number of other web forum discussions where people have this same problem, yet no one seems to have the answer. Not sure why it should be so difficult.
I'd REALLY appreciate if anyone has an answer for this.
micinfo said, "You cannot use variables when specifying a path in the Export Records script step."
You sure can.
FMPA8.5 does not allow me to use variables to specify a file reference in a script, and FMP Help says "Variables are not supported in file references".
How would you specify the relative path to the desktop and save it as part of the Export Records script step? I tried file : Desktop/filename.txt and it failed.
And these fail too:
I realize that the proper syntax for a relative file references is "file:directoryName/fileName" but that simply doesn't work in FMP/A 8.5! Very strange problem.
Please help if at all possible; it will be GREATLY appreciated!
Using variables in file paths was introduced in version 8. But you must use an actual script variable, e.g.
Set Variable [ $path; Value:Get ( DesktopPath ) & "ﬁlename.txt" ]
Export Records [ File Name: “$path”]
Note: the $path goes into the Export Records step without quotes.
I see that I was technically incorrect. I'm not trying to create a "File Reference" to the Desktop, I'm trying to create the "Output File Path List" in the "Specify Output File" dialog of the "Export Records" script step so that the records will be exported to a file on the Desktop!
Sorry for any confusion.
Ahh, ok, we got our comments caught in the crossfire. Sorry 'bout that. Yes, I was making the mistake of concatenating the $path with the file name right there in the Output File Path List dialog box and I guess it choked on that syntax, but when I concatenate EVERYTHING into a single variable INCLUDING the filename, and just place that one variable in the Output File Path List, it does work!
I knew it had to be simple. Thank you so much for renewing my faith!
Now if I could only resolve the problem I'm having with FMP hanging with large print jobs...
I finally did resolve the problem I had with FMP8.5 hanging with large print jobs: the Gutenprint drivers!