Re: Photoshop opening file
Re: Photoshop opening file
- Subject: Re: Photoshop opening file
- From: Shane Stanley <email@hidden>
- Date: Fri, 31 Jan 2003 08:10:33 +1100
On 31/1/03 3:45 AM +1000, Rick Norman, email@hidden, 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
You have a few problems there. First, theFolder is a list, and "list folder"
returns the name of files, not their full paths. You'll also probably have
more luck in the open command with an alias. And you need to fix your repeat
loop -- you're using both a "repeat with" plus a counter.
Try with something like this:
on open theFolder
set folderPath to (item 1 of thefolder) as text
set itemList to list folder (item 1 of thefolder) without invisibles
repeat with an_item in itemList
tell application "Adobe. Photoshop. 5.5"
activate
open an_item
-- probably need a delay in here
do script "page1"
end tell
end repeat
end o pen
--
Shane Stanley, email@hidden
_______________________________________________
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.