Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Gravydog316

macrumors 6502a
Original poster
May 17, 2016
564
200
Canada
You can always search for those files with either the Finder or Spotlight.
Did you try the script? Did it work?
I tested in Automator & it said "Workflow Complete" & saved it as "convert2JPG, but it's not in the Finder anywhere, or the right-click Quick Actions menu

1647596401934.png



get "Syntax Error": Expected “end” or “end tell” but found “on”.

"Apple Error -212"
 
Last edited:

kryten2

macrumors 65816
Mar 17, 2012
1,115
99
Belgium
I'm guessing from the screenshot you ran the quick action without any input. It needs image files from the Finder as specified on top.

Screenshot 2022-03-18 at 12.48.51.png


Screenshot 2022-03-18 at 13.11.53.png
 
Last edited:

bogdanw

macrumors 603
Mar 10, 2009
6,145
3,042
I think the problem is that Image Events needs Full Disk Access to work in Monterey 12.3.
You can add it manually /System/Library/CoreServices/Image Events.app
Image_Events.jpg
Here is the version I’ve just tested and works as a QuickAction.

AppleScript:
on run {input, parameters}
    tell application "Finder"
        set theFiles to input
        repeat with currentFile in theFiles
            if name extension of currentFile is in {"bmp", "heic", "heif", "jp2", "jpeg", "png", "psd", "tif", "tiff", "webp"} then
                set extension hidden of currentFile to true
                set theName to displayed name of currentFile
                set theOutputFolder to POSIX path of ((container of currentFile) as string)
                tell application "Image Events"
                    launch
                    set theImage to open currentFile as string
                    set theJPG to (theOutputFolder & theName & ".jpg" as string)
                    save theImage as JPEG in theJPG
                    close theImage
                end tell
                set label index of ((POSIX file theJPG) as alias) to 1
                delete currentFile
            end if
        end repeat
    end tell
end run
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.