Re: Photoshop opening file
Re: Photoshop opening file
- Subject: Re: Photoshop opening file
- From: Rick Norman <email@hidden>
- Date: Thu, 30 Jan 2003 17:20:58 -0600
Thanks to everyone for the help. The part that I really couldn't figure out
was why the file wouldn't open and this explains that. Obviously, the path
to the file has to be established to work and this clarifies how that needed
to be done. Having this problem resolved leads me to the next one.
This script is an effort to open each page of a 2 page PDF file and save
each page as a bitmap image. It appears that Photoshop will automatically
append a 1 at the end of the file for page 1 and a 2 for page 2, which is
fine for later importing the files into a document to be lasered.
As there will be several thousand of these PDF files in a given month, the
need to automate this is a must.
Having laid all this out, any suggestions on a better way of doing this? I'm
not against a totally different path as long as it doesn't require some huge
investment in some software that we don't already have.
Thanks again and I hope to get good enough at this to actually help someone
on the list.
Thanks,
Rick
>
From: Thomas <email@hidden>
>
Date: Thu, 30 Jan 2003 23:18:16 +0100
>
To: Rick Norman <email@hidden>
>
Cc: AppleScript <email@hidden>
>
Subject: Re: Photoshop opening file
>
>
You pix variable just contains the name of your files, Photoshop needs a
>
file path as string (not as alias) to open the files.
>
Also do a "list folder without invisibles" to avoid problems with files
>
like ".DS_Store".
>
>
This will do the trick :
>
>
on open theFolder
>
set itemList to list folder theFolder without invisibles
>
repeat with an_item in itemList
>
set file_path to ((theFolder as string) & an_item) as string
>
tell application "Adobe. Photoshop. 5.5"
>
activate
>
open file file_path
>
do script "page1"
>
end tell
>
end repeat
>
end open
>
>
Thomas
>
>
Rick Norman wrote :
>
>
> Can someone tell me what I'm missing here.
>
> Thanks,
>
> Rick
>
>
>
> on open theFolder
>
> set itemList to list folder theFolder
>
> set X to 1
>
> repeat with an_item in itemList
>
> set pix to item X in itemList as string
>
> tell application "Adobe. Photoshop. 5.5"
>
> activate
>
>
>
> --> Tried this with these results.
>
> open file pix --> The error returned with this is "Some
>
> object
>
> wasn't found"
>
>
>
> --> Tried this with these results.
>
> open file (the file pix as string) --> The error returned
>
> with
>
> this is "Can't make file "filename" of "Adobe. Photoshop. 5.5" into a
>
> string.
>
>
>
> do script "page1"
>
> end tell
>
> set X to X + 1
>
> end repeat
>
> end open
_______________________________________________
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.