re: newbie question
re: newbie question
- Subject: re: newbie question
- From: "Tracy Vanderwerf" <email@hidden>
- Date: Thu, 14 Mar 2002 20:32:54 -0500
- Organization: White Directory Publishers
I am pretty desperate to get this done before my manager kills me! I
would appreciate any help I can get! Thanks for looking at this.
A little background. I inherited this script and it works fine for
particular artwork. We now want to process artwork that has special
folder names.
A MultiAd image is opened for viewing or revision. Thru a QuicKeys
macro, an AppleScript is run that is supposed to take this image (while
it is open), make it into an EPS file and store it in the appropriate
folder.
The folder where it should go is TALL:TALL:TALL_SPEC_EPS:400:4214053.
The MultiAd file name is 4214053TR4914.
I would like to store it as
TALL:TALL:TALL_SPEC_EPS:400:4214053:4214053TR4914.EPS
I am trying to run this script, but get an "Invalid Directory
Specification". You can see my feeble attempt in building the path I
need. (It does give me the correct path, though)
Within the PreFab Player "Try" I am getting a dialog box that says
"can't make alias \"TALL:TALL:TALL_SPEC_EPS:400:4214053:\" of
application \"PreFab Player\" into a string."
I do not know what I am doing wrong here. I cut and pasted parts of the
script with my own additions into this abbreviated script:
set Pathfilepath to "DISK11:white_net:
data:users:IntraNetDev2"
set Pathfile to (open for access file Pathfilepath)
set JobRecord to (read Pathfile before return as {text} using delimiter
{tab})
set filepath to item 1 of JobRecord FILEPATH AT THIS POINT
IS TALL:TALL:TALL_SPEC:4214053TR4914
display dialog "filepath = " & filepath
close access file Pathfilepath
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set BOOK to text item 2 of (filepath as string) as string
set AppleScript's text item delimiters to oldDelimiters
display dialog "BOOK = " & BOOK
set eps_filepath to text item 1 of (filepath as string) as string
set eps_filepath to (eps_filepath & ":" & (text item 2 of (filepath as
string)) as string)
set eps_filepath to (eps_filepath & ":" & (text item 3 of (filepath as
string)) as string)
set eps_filepath to (eps_filepath & "_EPS" & ":" & (text item 4 of
(filepath as string)) as string)
set eps_filepath to (eps_filepath & ":" & (text item 5 of (filepath as
string)) & ":" as string)
----set eps_filepath to (eps_filepath & ":" & (text item 6 of (filepath
as string)) as string) & ".EPS"
display dialog "eps_filepath = " & eps_filepath
--set AppleScript's text item delimiters to oldDelimiters
set filepath to eps_filepath
set AppleScript's text item delimiters to oldDelimiters
display dialog "filepath = " & filepath
tell application "Multi-Ad Creator. 4.0.3"
activate
display dialog "filepath = " & filepath
display dialog ("Saving EPS to " & filepath & return & "Is this Okay?")
set oldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set BOOK to text item 2 of (filepath as string) as string
set AppleScript's text item delimiters to oldDelimiters
display dialog "BOOK = " & BOOK
-- display dialog filepath
try
display dialog "GETTING INTO TRY FOR PREFAB PLAYER"
with timeout of 20 seconds
tell application "PreFab Player"
display dialog "alias filepath = " & alias filepath
set dialog folder to alias filepath
display dialog "GOT PAST ALIAS FILEPATH"
do menu menu item "EPS" of submenu "Export" of menu "File"
type left arrow
type BOOK
type enter
-- replace existing file
--if exists button "Replace" then
-- click button "Replace"
--end if
end tell
end timeout
on error errormsg
display dialog (errormsg)
end try
end tell
[demime 0.98b removed an attachment of type text/x-vcard which had a name of tvanderwerf.vcf]
_______________________________________________
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.