Tue, Nov 17, 2009, 5:27pm Quick Text Substitution Hack via F-Script
Programming » F-Script
(Last updated: Wed, Nov 18, 2009, 1:36am)
T
his is just a quick hack example using F-Scirpt to add a feature to WriteRoom that isn't currently implemented. It's just one Cocoa API call away from doing what I want. This is not a permanent fix to my problem, but I thought it was neat enough to show others how F-Script can at least let you do little things quickly like this for those unfamiliar.

It's important to note that this is not a suggested thing to do when using WriteRoom. They are adding this feature which you can play with in their development version (appologies to the future if that link is dead). It's just a nice example of using F-Script on a 3rd party program to do things that it might not do on its own, or while you're waiting for something to get implemented.

You'll notice in the video that the only things that I had to type were simply: "gdb", "loadfs WriteRoom", "textreplacement" (this was optional, but convenient) and "YES". Although this did presume that one has the loadfs function sitting in their ~/.gdbrc file.



And, perhaps it's worth mentioning that this blog now has direct support for screencast movies created by QuickTime Player X. The only thing that bugs me is that QTPX doesn't let me set the dimensions of image it plays movies at by default when exporting for the web (that I know of).

  • Gand (Wed, November 18th, 2009, 2:22am UTC)
    Nice hack and nice screencast, although F-Script window is quite little to read.
    To get a WriteRoom similar effect I use Smultron. It has "View Document in Full Screen“ (Atl+Cmd+M) and support SL text substitution. You can set which text and background color you prefer using Appearance preferences.

  • Philippe (Wed, November 18th, 2009, 9:29pm UTC)
    Nice! Plus I liked the song so much that I bought it on iTunes (in case you're wondering, it's "Counting the Beat" by The Swingers)

  • Jeff (Thu, November 19th, 2009, 12:11am UTC)
    Ha! Glad you liked the song. I was wondering if anyone else would like it.

    I think if I were to do the screencast again I'd try to crank the screen resolution down even further and turn up the font in the Terminal window. On my 24" screen it seemed so small as it was. I wish QTPX could let you select just part of the screen so that I didn't have to change the Display settings each time. But they only just started with the "X" branch of QuickTime, so I'm sure many great improvements are to still come.

  • Miguel (Thu, February 23rd, 2012, 3:49pm UTC)
    Thanks for the screencast, I have just installed F-Script and had overlooked the "Select view" thing. A new world opens up!

Leave a comment