get last group of images and open with app.
What I would like to do is take a series of images, and then open this series of images into helicon focus where it then merges the images together.
I'm hoping that with applescript. I can get the open the last set of images (jpg only, PSD's arrive in the same folder and don't need to be recognised) . That are shot within the 2 minutes. I have the script below might begin to help me. although I need it to select all of the images shot in the last minute. Then open with helicon Focus (that is not scriptable) i'll use system events from there.
It will need to run the script when there are no new files after 30 seconds then group all the images togethe and hightlight and open.
Can this be adapted?
try
tell application "Finder" to set currFolder to front Finder window -- get id of front Finder window
on error
return -- no Finder window
end try
set tDate to (current date) - 60
repeat
set b to false
try
tell application "Finder"
repeat with i in (get document files of currFolder whose creation date > tDate) -- get newer files
if (exists currFolder) then
reveal i
my selectionfullScreen()
set cDate to creation date of i
if cDate > tDate then set tDate to cDate -- store newer date
set b to true
end if
end repeat
end tell
on error number n
if n = -1728 then return --quit the script, the current Folder is closed
end try
if not b then delay 2 -- no recent files, wait 2 seconds
end repeat
iMac, Mac OS X (10.6.8)