Re: My soul is tormented by Quark (I think)
Re: My soul is tormented by Quark (I think)
- Subject: Re: My soul is tormented by Quark (I think)
- From: "Rips Ethan J" <email@hidden>
- Date: Wed, 9 Oct 2002 11:23:01 -0400
- Thread-topic: Re: My soul is tormented by Quark (I think)
[LENGTH WARNING]
On Wednesday, 09 Oct 2002, Shane Stanley wrote:
On 9/10/02 12:08 AM +1000, Rips Ethan J, email@hidden, wrote:
>
Now I'm getting an end of file error. Any ideas on what might be causing
>
that?
Not really. Is the file being saved locally or to a remote volume?
Shane-
I'm saving it to a folder on my desktop. (BTW, I'm running OS 9.2.2 on a
G4/800 with 256MB RAM. I'm also using Script Debugger 3.0.4 & Quark 5. I don't
know if that makes any difference.)
I don't know if this is related, but the template used to create the new Quark
file here:
property templatePath : alias "Production:Fact Sheets:=
Templates:FactSheetTemplate"
is on our NT server.
Here's a hard-coded version of the insertPie handler which I've been using to
try to troubleshoot the script:
--START OF SCRIPT SNIPPET--
--on insertPie(alias "Thelonious:Desktop Folder:07_02 Fact Sheets:=
Graphics:Pie Charts:Institutional_Class B:132PER-0702.eps", alias
"Thelonious:Desktop Folder:07_02 Fact Sheets:= Graphics:Pie
Charts:Institutional_Class B:", 1002)
--global destFolder
set destFolder to
(choose folder with prompt "Select the destination folder for the fact
sheets:")
set docName to (("Thelonious:Desktop Folder:07_02 Fact Sheets:=
Graphics:Pie Charts:Institutional_Class B:132PER-1002.eps")'s text from
character -13 to character -15) & "PER-" & "1002"
set resultName to ("" &
destFolder & docName)
set folderPath to alias "Thelonious:Desktop Folder:07_02
Fact Sheets:= Graphics:Pie Charts:Institutional_Class B:"
set chartName to
alias "Thelonious:Desktop Folder:07_02 Fact Sheets:= Graphics:Pie
Charts:Institutional_Class B:132PER-1002.eps"
try
set myPie to ("" &
folderPath & docName & ".eps")
set myPie to (myPie as alias)
on error errMsg
number errNum
error "File does not exist."
end try
tell document 1 of
application "QuarkXPress(tm)"
activate
if not (document 1 exists) then
open file (alias "Production:Fact Sheets:= Templates:FactSheetTemplate")
end if
tell picture box 1
try
set image 1 to myPie
set bounds of
image 1 to centered
on error errMsg number errNum
set image 1 to (choose
file with prompt "Select pie chart:")
set bounds of image 1 to centered
end try
end tell
try
--SCRIPT CHOKES HERE: "End of file error"
save
document 1 in file resultName without template
on error errMsg number
errNum
--QuarkXPress(tm) got an error: File some object is busy.
tell
application "Finder"
display dialog " Can't save document due to error " &
errNum & return & " " & errMsg
end tell
end try
close document 1
end
tell
--end insertPie
--END OF SCRIPT SNIPPET--
Thank you very much for your help.
Ethan
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.