Aussie John Posted August 22, 2005 Posted August 22, 2005 Hi I want to export a file in scriptmaker. Is it possible to send it to the users desktop rather than a specific place. I tried file:~/Desktop/export.txt but that didnt seem to work. Thanks
Fenton Posted August 22, 2005 Posted August 22, 2005 You cannot do a FileMaker export to the user's desktop, because each user desktop is unique, and unfortunately FileMaker doesn't recognize the "~" syntax, which is Unix. It can export to another known folder. One that everyone should have, unless they've renamed their hard drive, is: Macintosh HD/Users/Shared/ Add a "filemac:/" prefix, and append a fixed file name for a full FileMaker export path, Export, then move the file to the desktop with AppleScript (which also knows the path to the user's desktop). tell application "FileMaker Developer" -- comment out or remove this line the last "end tell" if in a Perform AppleScript step -- FileMaker Export path: filemac:/Macintosh HD/Users/Shared/Export.pdf set sharedFolder to (path to "sdat") as string set sharedFile to sharedFolder & "Export.pdf" -- AppleScript path: Macintosh HD:Users:Shared:Export.pdf tell current record of window 1 set fileName to cell "FileName" end tell set newFile to sharedFolder & fileName tell application "Finder" try set name of file sharedFile to fileName set movedFile to move file newFile to the desktop with replacing -- with replacing overwrites this file if it exists open movedFile -- optionally open the file end try end tell end tell
Recommended Posts
This topic is 7035 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now