Help me with Folder Action scripts in Mac OS X.
March 31, 2004 5:23 AM Subscribe
A question about using Folder Action scripts in Mac OS X and tinkering with them to get them to do what you want. [more]
I created a folder called Make PNG and attached the "Duplicate as PNG" Folder Action script to it. It wasn't doing anything with PDFs (screen captures) I dropped on it, so I edited the script to accept PDF files too.
Here's the problem:
PDF screen capture is 44K. PNG generated automatically by the script is 100K. If I instead use Preview to export the PDF to PNG (best depth, non-interlaced) the size is 56K. There's no visible difference between the different PNG files, but I want the script to give me the smaller file size since I'm converting things to PNG in order to optimize them for the web. How can I edit the script to do that?
I created a folder called Make PNG and attached the "Duplicate as PNG" Folder Action script to it. It wasn't doing anything with PDFs (screen captures) I dropped on it, so I edited the script to accept PDF files too.
Here's the problem:
PDF screen capture is 44K. PNG generated automatically by the script is 100K. If I instead use Preview to export the PDF to PNG (best depth, non-interlaced) the size is 56K. There's no visible difference between the different PNG files, but I want the script to give me the smaller file size since I'm converting things to PNG in order to optimize them for the web. How can I edit the script to do that?
Do you have photoshop?
Automated droplets are many times more powerful than the folder actions.
File > Automate > Create Droplet. Do this with any action set.
I simulated the above conditions and turned a 704kb pdf screenshot into a 164kb non-interlace/128-colors/88%-dither png.
posted by evilbeck at 7:47 AM on March 31, 2004
Automated droplets are many times more powerful than the folder actions.
File > Automate > Create Droplet. Do this with any action set.
I simulated the above conditions and turned a 704kb pdf screenshot into a 164kb non-interlace/128-colors/88%-dither png.
posted by evilbeck at 7:47 AM on March 31, 2004
Response by poster: bcwinters, that's exactly what I needed to do. Taking out "with icon" resulted in a smaller PNG.
(I'm currently operating without Photoshop, making do with what I've got here.)
posted by emelenjr at 10:00 AM on March 31, 2004
(I'm currently operating without Photoshop, making do with what I've got here.)
posted by emelenjr at 10:00 AM on March 31, 2004
FWIW, on the mac, you don't have to capture screenshots as PDFs, they can be copied straight to the clipboard.
[A] + SHIFT + 4.
I've even switched the two commands in the System Prefs > Keyboard & Mouse > Keyboard Shorcuts menu so that the usual ([A] + Shift + 3) key command clips to the clipboard. Then I paste into Fireworks or Photoshop and I'm off to the races, no annoying clipping from the PDFs.
posted by zpousman at 1:20 PM on March 31, 2004
[A] + SHIFT + 4.
I've even switched the two commands in the System Prefs > Keyboard & Mouse > Keyboard Shorcuts menu so that the usual ([A] + Shift + 3) key command clips to the clipboard. Then I paste into Fireworks or Photoshop and I'm off to the races, no annoying clipping from the PDFs.
posted by zpousman at 1:20 PM on March 31, 2004
Ditto, zpousman. I just wish it didn't capture those pictures in tiff format, because when I email people screenshots they sometimes are stumped by the tiffs.
posted by jragon at 4:30 PM on March 31, 2004
posted by jragon at 4:30 PM on March 31, 2004
Response by poster: I have no idea what key combination you're referring to. [A] for Alt (Option)? Shift-Option-4 triggers a beep. [A] for Apple (Command)? Command-Shift-4 turns the arrow cursor into crosshairs so you can select a region of the screen.
(Checks System Prefs...)
Ah, you meant Command. Sorry, I didn't follow you there at first.
Editing the default keyboard shortcuts is a handy thing, but I still like the Folder Actions option instead of taking a screenshot and having it go directly to the clipboard because doing it that way doesn't require firing up Preview/Photoshop/whatever, pasting the clipboard contents into a new document and saving that. Seems like too many extra steps.
posted by emelenjr at 5:34 PM on March 31, 2004
(Checks System Prefs...)
Ah, you meant Command. Sorry, I didn't follow you there at first.
Editing the default keyboard shortcuts is a handy thing, but I still like the Folder Actions option instead of taking a screenshot and having it go directly to the clipboard because doing it that way doesn't require firing up Preview/Photoshop/whatever, pasting the clipboard contents into a new document and saving that. Seems like too many extra steps.
posted by emelenjr at 5:34 PM on March 31, 2004
Response by poster: Eh, that wasn't clear. "That way" meaning the Folder Actions way.
posted by emelenjr at 5:36 PM on March 31, 2004
posted by emelenjr at 5:36 PM on March 31, 2004
This thread is closed to new comments.
posted by bcwinters at 7:17 AM on March 31, 2004