set obj to place (myFolder as string) &
fName into document 1 at position {100, 100}
set oType to get object type of obj
if oType = "Image" then
set img to convert obj to image
if get resolution of img > 72 then
set image resolution of img to 72 without
preserving data
save document 1 in (myResults as string) &
"new_" & fName as jpeg with useSelection
end if
end if
delete obj
end tell
end repeat
To run the sample script
At the top of the Script Editor window are the control buttons used to
execute or stop a script. To execute the downsample script, click
Run. Click the Stop button to stop the script.
Note: If you click the Stop button before the script is finished, your
results will be incomplete.