roadrunnertwice: DTWOF's Lois in drag. Dialogue: "Dude, just rub a little Castrol 30 weight into it. Works for me." (DTWOF.Lois - Castrol)
[personal profile] roadrunnertwice
I got annoyed at something earlier today and decided to fix it, and FastScripts was once again the first tool I reached for, so I decided to finally shell out for it.

For the curious: I got sick of downloading PDFs I only intend to read once and then having them clog up the downloads folder, and I wanted a command to trash the file right from the PDF reader. (Preview isn't scriptable, of course, but you should be using Skim anyway.)

tell application "Skim"

set current_file to file of document of window 1

tell window 1 to close

tell application "Finder" to delete current_file

end tell

Nice!

Date: 2012-05-25 01:47 am (UTC)
From: [personal profile] nadreck
Seems like a nice, fast script there.

As far as Preview not being scriptable: it adds a lot of its functions to Automator, but isn't technically scriptable itself. That said, any command that would qualify as an "Apple Event" (ie, open, close, switch to window, etc) is supposed to work whether the rest of the app is scriptable or not.

Profile

roadrunnertwice: Vesta Tilley, Victorian drag king (Default)
Nick Eff

August 2017

S M T W T F S
  1234 5
6789101112
13141516171819
20212223242526
2728293031  

Expand Cut Tags

No cut tags

Most Popular Tags

Static and Noise

If you pass the rabid child, say "hammer down" for me.

The Fell Types are digitally reproduced by Igino Marini.

Style Credit