skypeをmarqueeさせる

直前の発言を上キーで編集できるので

#!/usr/bin/env ruby
require 'rubygems'
require 'applescript'

script =
'tell application "Skype"
  activate
end tell'
AppleScript.execute(script)

def right
  script =
'tell application "System Events"
  tell application process "Skype"
    keystroke (ASCII character 30)
    keystroke (ASCII character 30)
    keystroke "__"
    keystroke (ASCII character 13)
  end tell
end tell'
  AppleScript.execute(script)
end

def left
  script =
'tell application "System Events"
  tell application process "Skype"
    keystroke (ASCII character 30)
    keystroke (ASCII character 30)
    keystroke (ASCII character 127)
    keystroke (ASCII character 127)
    keystroke (ASCII character 13)
  end tell
end tell'
  AppleScript.execute(script)
end


loop do
  30.times do
    right
    sleep 1
  end

  30.times do
    left
    sleep 1
  end
end