Article:
  Replacing AppleScript with Ruby
Subject:   Accessing the clipboard via rb-appscript
Date:   2007-03-01 16:19:31
From:   bbebop
Matt, great article. I've been playing around with appscript by rewriting an existing applescript that contains the following code:


set the clipboard to "some text"


Frankly, not sure what app controls the clipboard. Thanks!

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Matt Neuburg photo Accessing the clipboard via rb-appscript
    2007-03-01 17:49:48  Matt Neuburg | O'Reilly AuthorO'Reilly Blogger [View]

    Frankly, not sure what app controls the clipboard

    See my book! "set the clipboard" is an osax command. The article tells you how to access osax commands. So e.g. osax.set_the_clipboard_to("howdy").
    • Accessing the clipboard via rb-appscript
      2007-03-01 23:33:05  bbebop [View]

      Thanks, Matt. That helped. Now I must have my copy of Frontier: The Definitive Guide around here somewhere. Never could get next to Applescript and miss Frontier. Maybe Ruby will be the charm??
      • Matt Neuburg photo Accessing the clipboard via rb-appscript
        2007-03-02 16:11:05  Matt Neuburg | O'Reilly AuthorO'Reilly Blogger [View]

        Indeed. It was Frontier that taught me that there was a better way to construct and send Apple events. And Ruby does have some features that are pleasingly similar to Frontier's UserTalk, and rb-appscript is also quite reminiscent of the way UserTalk did Apple events.