I’ve written a simple script to extract text from every text box in a QXP 6.5 document and write it to a text file.
Problem is that I get the following error when I attempt to run the script:
“QuarkXPress got an error: File permission error”
Any idea what I’m doing wrong - script below? I’d be grateful for any help.
Tom
tell application “QuarkXPress”
activate
repeat with i from 1 to (count of text boxes) of document 1
set my_words to contents of text box i of document 1
my filewriter(the_file, my_words)
end repeat
end tell
on filewriter(the_file, my_words)
try
close access file the_file
end try
open for access the_file with write permission
write my_words to file the_file starting at eof
close access the_file
end filewriter