roadrunnertwice: DTWOF's Lois in drag. Dialogue: "Dude, just rub a little Castrol 30 weight into it. Works for me." (DTWOF.Lois - Castrol)
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

roadrunnertwice: Weedmaster P: "SON OF A DICK. BALL COCKS. NO. FUCKING." (Overcompensating.WeedmasterP - Shitbox)
So I was just thinking that I missed being able to automatically post the current music to LJ, back when I was using Xjournal. And that got me thinking about whether I could rig something up to just type the current track into the web form for me, right? Answer: Hell yes, I can! It is Applescript, and is predictably barbaric. Check it out:

Paste current iTunes track.scpt:

Some barbaric Applescript )

(I was originally going to just use the keystroke function to actually TYPE the text, instead of blowing away the clipboard, but this turns out to result in comedy for tracks with any non-ASCII characters.)

And then when I was about to post about how cool this was, I ran smack into how annoying it is to turn formatted RTF-ey text into a useful HTML fragment. So I wrote a script to do THAT for me, too. This one requires an external tool called "premailer," so you'll have to install that with gem.

This one SHOULD work with styled text copied from Word, TextEdit, or basically anywhere, but I haven't tested it very thoroughly yet.

Convert RTF clipboard to HTML fragment.scpt:

More barbaric Applescript )

As ever, just paste these into Applescript Editor, save them in ~/Library/scripts, and run them with FastScripts.


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

August 2017

  1234 5

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