migrating script to later OS
migrating script to later OS
- Subject: migrating script to later OS
- From: Karen Fioretti <email@hidden>
- Date: Mon, 25 Jun 2001 11:58:50 +0000
- Organization: Lowell Sun Publishing
Hi, everyone.
I'm fairly new to Applescript. Although I've utilized scripts for years,
I've never had to manage them myself before.
I have a Quark 3.3 script that has been running fine on OS 8.1 (yes,
we're very behind). It saves every page of a document
with a specific file name to a particular hard drive location.
I am now trying to run it for Quark 4 on OS 9.0.4 and 9.1 and it errors
at
save it fileName EPS format "mac in BW" EPS data "ASCII EPS"
If anyone can help me, I'd really appreciate it!
Here is the text of the entire script:
set filePath to "Macintosh HD:TV EPS:"
tell application "QuarkXPresst"
activate
set view scale of document 1 to "100%"
set numPages to count of pages of document 1
repeat
display dialog ,
"Which page do you want to begin at?" default answer {"Page Number"}
,
buttons {"OK", "Cancel"} default button "OK"
try
set theResult to the result
set startPage to text returned of theResult as integer
if startPage * 1 and startPage ? numPages then
exit repeat
else
display dialog "That is not a valid page number for this document."
end if
on error
display dialog "That is not a number."
end try
end repeat
tell application "Progress Bar 1.0.1"
make window
set the Name of window 1 to "Sending EPS Files"
end tell
repeat with x from startPage to (count of pages of document 1)
tell application "Progress Bar 1.0.1"
tell progress bar 1 of window 1
activate
set caption to "Postscripting page " & x
set maximum value to numPages
set minimum value to startPage
set current value to x
if x is numPages then quit
end tell
end tell
set fileName to filePath & x & " TV page.eps"
tell page x of document 1
save it in fileName EPS format "mac in BW" EPS data "ASCII EPS"
end tell
end repeat
end tell