(no subject)
(no subject)
- Subject: (no subject)
- From: John <email@hidden>
- Date: Tue, 1 Jun 2004 15:19:04 -0400
Hi,
I'm not familiar with quoted form, but that is where the problem is. I
adapted your script to my computer and received the same error. I
trapped the error with display dialogs (primitive, but effective) and
found it was after the touch command. I was able to get it to work when
I altered it to this:
do shell script "touch /Users/admin/Desktop/test.ai"
do shell script "cat /Users/admin/Desktop/sourcefile.ai >
/Users/admin/Desktop/test.ai"
I'm sure the rub is in the use of quoted form. The two lines above are
essentially a copy command, though you could use other Unix commands to
manipulate the file before it's finished copying.
I hope this at least points you in the right direction.
John
On Jun 01, 2004, at 11:52 AM, Rob Stott wrote:
Hi all,
I'm having a bit of a problem with a script I'm writing. I want to
read an Illustrator CS file using a shell script, then write it back
to a new file, again using a shell script.
Needless to say, in the middle I'll eventually be doing some bits and
bobs to the file which is why I'm not using 'mv'. At the moment just
reading and writing is causing me problems.
Although I'm quite happy with AppleScript, UNIX is newish to me so I
guess I'm probably making a daft mistake.
Can anyone see what's wrong with this...
--this line reads an existing file
set theRawIllustratorData to (do shell script "cat
/Users/admin/Desktop/sourcefile.ai")
--this line writes it to a new file
do shell script "touch /Users/admin/Desktop/test.ai; echo " & (quoted
form of theRawIllustratorData) & " > /Users/admin/Desktop/test.ai"
...i get the error...
sh: -c: line 1: unexpected EOF while looking for matching `''
sh: -c: line 2: syntax error: unexpected end of file
...the Illustrator is just a blank A4 document.
Can anyone give me any advice on this one?
Thanks in advance
Rob
---------------
No one can make you feel inferior without your consent.
Eleanor Roosevelt
_______________________________________________
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.