I have a doc open next I made some changes to the doc. now I want to close it with the changes I have made to it. Then paste the filename from my clipboard and save the file in a folder called test on my desktop.
set DestFolder to {"HD:Desktop folder:Test"}
tell application "QuarkXPress™"
tell document 1
close document 1
save changes button yes
paste
end tell
end tell
This will set the name of your file to whatever the cliboard is…
tell application "Finder"
activate
set fileName to the clipboard
set the name of file "Mac HD:Desktop Folder:Your file.qxp" to fileName
end tell
Closing a Quark Document with saving changes…
close document 1 saving yes
If the document has yet to be saved anywhere you would have to tell Quark where to save it…
close document 1 saving yes saving in "Mac HD:Some Folder:Your file.qxp"
Good luck!
close document 1 saving yes saving in “HD:Desktop Folder :Test:12345.qxd”
This saves the file in my folder and names it 12345.qxd
But what I need to do is save the file in my test folder with the text that is on my clipboard. Like whatever is on my clipboard set it to filename. I hope i am making sense some type of variable I guess.
tell application 'Quark"
set filename to clipboard
close document 1 saving yes saving in “HD:Desktop Folder :Test:” + filename
end tell
You are making sense, and you are close. To my knowledge you cannot use Quark to get the clipboard contents.
You can either use the Finder or use Jon’s Commands “the clipboard” to get your file name from the clipboard.
Example: (after you have copied your file name)
tell application "Finder"
activate--if you are using the Finder to get the clipboard you have to activate
set fileName to the clipboard--get the contents
set filepath to "Mac HD:Desktop Folder:Test:" & fileName as text--concat with rest of path
end tell
then to have Quark save:
tell application 'Quark"
close document 1 saving yes saving in filepath--close, saving in the file you built using the clipboard contents
end tell
That is one way to do it anyway. My previous post saved your Quark file using a generic name and instructed the Finder to set the name of the file to whatever the clipboard was at the time, instead of Quark. Either way works.
Good luck,
Thanks for your help. It works just like I need it to