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: "G?ran Ehn" <email@hidden>
- Date: Wed, 09 Oct 2002 21:54:15 +0200
Are you using Apples Script Editor or Script Debugger?
/goran
On Wed, 9 Oct 2002 15:15:49 -0400
"Rips Ethan J" <email@hidden> wrote:
On October 9, 2002, Goran Ehn wrote:
Did you check your variable resultName?
Make sure the path is correct like
"HD:FOLDER1:FOLDER2:NEWFILENAME"
You can do that by inserting display dialog right before
your save command
(display dialog resultName)
Goran-
There's nothing like omitting the key piece of info when
communicating with
other people... ;-)
The second line should've read thusly:
'I was wondering if it should be alias
"Thelonious:Desktop Folder:Test
f:132PER-1002".' (ahem) ;-)
On another tack, I noticed that the non-hard coded (i.e.,
"real") script was
missing a crucial hyphen ("PER-") in this (since
corrected) line:
set docCode to (chartName's text from character -13 to
character -15) & "PER-"
& dateCode
But now I run into another problem:
1. When I run the script with the above correction, the
script stops at the
following line:
"close document 1 saving yes"
and I get the following error message:
"Can't save document due to error -47.
QuarkXPress got an error: File some object is busy."
2. If I try
"close document 1 saving no"
the script stops at the error message in the try block at
the top of the
insertPie handler:
"File does not exist."
I've noticed in debugging, regardless which of the above
changes are used (or
none of the above, I don't see any values for myPie in
the debugging screen,
which leads me to believe the culprit may be there. But I
don't see anything
wrong with myPie. What am I missing?
Thanks for your help.
Ethan
----------
From: G?ran Ehn
Sent: Wednesday, October 9, 2002 2:56 PM
To: Rips Ethan J
Subject: Re: My soul is tormented by Quark (I think)
Well, I cannot tell if that is correct or not but you
should concider to run the save command with the path
hardcoded in a separate script, and you might remove any
odd characters from folders like "Test f", just in case!
/goran
On Wed, 9 Oct 2002 14:19:20 -0400
"Rips Ethan J" <email@hidden> wrote:
>Goran-
>
>resultName evaluates to "Thelonious:Desktop Folder:Test
>f:132PER-1002", which is correct.
>
>I was wondering if it should be "Thelonious:Desktop
>Folder:Test f:132PER-1002"? (Grasping at straws,
>perhaps.)
>
>Thanks.
>
>Ethan
>
>
>
>> ----------
>> From: G?ran Ehn
>> Sent: Wednesday, October 9, 2002 1:51 PM
>> To: Rips Ethan J
>> Subject: Re: My soul is tormented by Quark (I think)
>>
>> Did you check your variable resultName?
>> Make sure the path is correct like
>> "HD:FOLDER1:FOLDER2:NEWFILENAME"
>> You can do that by inserting display dialog right
before
>> your save command
>> (display dialog resultName)
>> regards
>> Goran Ehn
>>
>> On Wed, 9 Oct 2002 11:23:01 -0400
>> "Rips Ethan J" <email@hidden> wrote:
>> >[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.
_______________________________________________
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.
_______________________________________________
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.