MACSCRPT Archives

August 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Levon Spradlin <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 16 Aug 2007 14:12:53 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (63 lines)
    I have a script that I finally have working. Many revisions later, I am
proud of it, and thankful for the advice of fellow scripters. I am using
Script Debugger 4, and when I try to save it as an app, it errors out with
³Could not run this script because of a problem connecting to the scripting
component. -1762²
    I have tried saving it as both a Bundle and a Carbon app, with no luck.
On a Mac without SD4, it errors. On a Mac with SD4, it opens, then opens SD4
and starts debugging. I can run the script just fine from  the execute
command in SD4, but no other way.
    Am I saving the file incorrectly, or is there an error in the way I have
my Œon runı block set up? Any advice is appreciated.


on run
    set FileSample to choose folder
    set folderName to name of (info for FileSample)
    tell application "Finder" to set theFiles to files of folder FileSample
whose name extension is in {"eps", "ai", "ART1", "ART2", "ART3", "ART4"} or
kind contains "Postscript" or kind contains "EPS" or kind contains
"Illustrator" or kind contains "ART5"
    repeat with oneFile in theFiles
        set {creation date:creationDate, modification date:modDate,
name:Filename} to info for oneFile as alias
        set fileLocation to POSIX path of (oneFile as alias)
        set myList to "Filename: " & Filename & return & "Parent folder: " &
folderName & return & "Creation date: " & (creationDate as string) & return
& "Modification date: " & (modDate as string) & return & "Location: " &
fileLocation & return & return
        tell application "Adobe Illustrator"
            activate
            open (oneFile as alias) with options {update legacy text:true}
forcing CMYK without dialogs
            tell front document
                set ruler origin to {0.0, 0.0}
                make new text frame with properties {contents:myList,
kind:point text, position:{50, 740}, name:"Temp Info 1"}
                print
                close saving no
            end tell
        end tell
    end repeat
end run


thanks,
Levon Spradlin
Desktop Publishing Technology Manager, Assessment & Information
Pearson
512-989-5300 x 3989
[log in to unmask]






**************************************************************************** 
This email may contain material confidential to
Pearson.  If you were not an intended recipient, 
please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

ATOM RSS1 RSS2