Trying to Script an image folder

I currently have made a script that opens an image in photoshop cs once it is dropped into a folder. I have it display a dialog asking if I would like to open it in PS CS with standard “Yes” & “No” buttons. Now I would like it if I could find a way to hold off opening a set of images (not the entire folder, just the ones that are sent during that specific session.) by adding an extra “Wait” button and have PS CS open the entire session.
Since I am soooooo new with this, I thought that the ‘list’ command would work, but, alas, I cannot figure out how. For your review, I shall copy:paste what I have…

on adding folder items to this_folder after receiving these_items
display dialog “Images have been sent to Color Images. Do you want them opened in Photoshop?” buttons {“Yes”, “Wait”, “No”} default button 1
if the button returned of the result is “Wait” then
copy {these_items} to the_list
–delay 30
tell application “Adobe Photoshop CS”
activate
open the_list
end tell
if the button returned of the result is “Yes” then
tell application “Adobe Photoshop CS”
activate
open these_items
end tell
else
ignore
end if
end if
end adding folder items to

I realize that this seems very elementary to the seasoned scripters out there, but I have read the books and scoured the web to figure what it is I’m doing wrong. I appreciate any help. Thanks

I’m not sure I get the point? What’s going on when you’re delaying for 30 seconds? (Currently commented out.) How is this different than the behavior you have for the “Yes” button?

The script is run by a drop event on the folder. If you intend to drop some files, click wait, drop some more files, click wait, drop some more files, and click yes, the script is running 3 times. The third run will have no idea what files were dropped in the first two batches unless you save them somewhere by putting their paths into a property, text file, move the files to a “Wait” folder whose contents can be opened later, etc. Of you could just let the script ignore the value of these_items when the user clicks yes and just open every file in the drop folder. You’d have to move them out once you processed them, though.

The idea behind this is that I sometimes retrieve one photo or more than one on various occasions. I found it slow to respond to the dialog, wait for PS to open the image, just to return again to continue to get more photos. I was experimenting with the idea of somehow scripting the images into a list (You know…{xxx, yyy, zzz}…)when the “Wait” button is pressed and retrieving the entire list when I select button “Yes”. Having read what you wrote, I begining to understand that the list command is strictly text for Applescript only and has no direct connection to the actual file. I should do as you suggest and have a temp folder to send the “Wait” images into and have the script open the contents of this temp folder when I select the “Yes” button. Is it feasible to have the script make an alias in the temp folder and once the wait button is selected, the script opens the aliases then purges them out of the wait folder? (Am I getting too complicated? It’s hard to have the ambition, but not the knowledge!)
By the way, the 30 second delay was for me so that I could have some time to continue getting photos. It was commented out so that I could try out the script without waiting 30 seconds to see results. I forgot to edit it out when I posted. Sorry.
Thanks. Now if I only could figure out HOW to do what was suggested.

Ambition is more important. The knowledge will come.

Yes, you could create an alias to put into the wait folder.

Get as close to what you want as possible and then post it with any questions.

Well, I’ve been at it again and have come up with this dud:

on adding folder items to this_folder after receiving these_items
display dialog “Images have been sent to Merlins Color Images. Do you want them opened in Photoshop?” buttons {“Yes”, “Wait”, “No”} default button 1
if the button returned of the result is “Wait” then
tell application “Finder”
make alias of these_items to folder “Holding Tank” of startup disk
end tell
if the button returned of the result is “Yes” then
tell application “Adobe Photoshop CS”
activate
open items of “Holding Tank”
end tell
end if
move items of “Holding Tank” to trash
end if
if the button returned of the result is “Yes” then
tell application “Adobe Photoshop CS”
activate
open these_items
end tell
end if
end adding folder items to

I realize that I didn’t specify where or what “Holding Tank” is but it wouldn’t let me add ‘open items of folder “Holding Tank” of startup disk’. It said I didn’t have access to the folder. (I set the holding tank permissions to read & write, still no good.) Any info or revise is greatly appreciated. Thanks.