Entries Tagged 'Skype' ↓

Initial Release of JustCall for OS X

After goofing around at home for a few days, I finally get back on the coding wagon, fixed a few more bugs, and packaged up JustCall v0.5.1 for release. It’s avaialble here. Feel free to play with it. It’s simple but that’s the point!

In later days, I’ll be adding call answering to it. Basically, this will pop up a panel with two very large buttons to accept or deny a call. After that, if anyone other than my wife regularly uses it, I’ll see about adding some new features. Otherwise, it’s back to writing additional tools to help me manage my media server or otherwise simplify some minor productivity annoyances that I have with various OS X apps.

“SimpleSkype”

O, happy day! One of the WxRuby devs (Alex Fenton) was kind enough to track down the memory leak. I understand that the fix should be released with the 0.40 verison in the next few days!

Prior to hearing word back from Alex, I had rewritten the entire UI in Ruby/Tk. I have to say, it was amazingly simple. IO went from knowing nothing about Ruby/Tk to having a complete Tk GUI in just a few hours. However, sadly, there doesn’t seem to be a a method to access the “Metal” look and feel. For me, this is a huge plus for using WxRuby. Being able to turn off the window controls significantly simplifies the usability of the application.

I’ll post the code for both version of “SimpleSkype” after the coming 1.0 release — and a rebranding. I don’t want to infringe on Skype’s trademark as this can be detrimental to one’s sanity.

I also just discovered Rubyscript2exe which promises to greatly simplify the deployment of my app to OS X! And here I thoughtthat I was going to have to write one from scratch. Man, I love the free software community!

rb-skypemac 0.2.0 is up

This one adds a moderate helping of contact management not limited to but include the ability to access lists of online friends, users awaiting authorization, all known users, and others. Also, it adds the ability to access various pieces of information about known users, blocking and unblocking of users, and much more.

0.2.0 may be the last release for a while as it should accomodate most of the features that I will need for my coming Skype project.

Download link and as well as gem install instructions and sample code are here.

rb-skypemac is up on RubyForge

You can find it here: http://rb-skypemac.rubyforge.org/.

Introducing rb-skypemac

Since I discovered rubyosa, I’ve made it one of my side projects to improve the accessibility of my wife’s iMac. She loves to use Skype to video chat with her mother in Maryland and her brother in New York. However, the tiny buttons in Skype cause the UI to be problematic for her.

What to do?

I planned (and still do) to write a simple UI for Skype with larger buttons and fonts. However, in order to do so, I needed an interface that would allow me to do more than merely send commands to Skype. Sadly, rubyosa falls down here.

But then I found rb-appscript or just appscript. Appscript seems to provide a more direct connection to the Applescript Event layer and it provides return values from Applescript unlike the current 0.4.0 version of rubyosa.

All said, I implemented a small subset of the Skype API as a gem. I’ve submitted it to RubyForge for addition as a project. Until then, I give you rb-skypemac-0.1.0.

I have yet to decide if I will take this gem further. If it proves adequate for my needs, I may just move on to my next project: a more feature complete version of rb-itunes than what has been submitted to RubyForge.

[Get it here: rb-skypemac]

Controlling IM app statuses in one place

For my next trick, I was going to sling together a UI to help my wife manage Skype. But then I found that the Skype API is a little more painful than just RubyOSA.

I discovered that RubyOSA comes with a built in script to generate RDoc for any AppleScript-supporting application that has a defined AppleScript definition. How handy! “rdoc –name Skype” and off I went. Or so I thought. Skype’s AppleScript API is simple: they give you one command that accepts commands using their protocol.

Not entirely dissuaded, I started my campaign to create a script to change the status of my iChat, Adium, and Skype (yes, I need all three — don’t you???) simultaneously.

To automate things further, I deposited the script in ~/Library/Application Support/Quicksilver/Actions. I then input the command (on, off, or away) via Quicksilver using ‘.’ to let me enter a command and then my script shows up as a target. I then created Quicksilver hotkeys for online (CTRL-CMD-UP), offline (CTRL-CMD-DOWN), and away (CTRL-CMD-LEFT or “exit stage left” as I see it). So, finally, my IM status should reasonably reflect when I’m actually on or off.

If you want to use this script:

  • Bear in mind, your Ruby binary is probably installed somewhere other than /usr/local/bin/ruby so you’ll need to tweak that line.
  • You’ll need rubygems installed
  • You’ll need the RubyOSA gem installed

No, Steve, I was not up all night working on this.

[Download] (right click “Save Link As”)

Update (3/12/07): Since made some minor tweaks to support custom away messages for Adium and iTunes. Of course, to make this “sexy” (extensible), I’d scan a subdirectory for “plugins” that would manage the status per IM application allowing for you Mac users who use Fire instead of Adium, for example.

#!/usr/local/bin/ruby

require 'rubygems'
require 'rbosa'

def get_app(app_name)
  app = OSA.app(app_name)
  if app.nil?
    puts "#{app} does not exist"
    exit
  end
  app
end

$Adium = get_app "Adium"
$iChat = get_app "iChat"

$MESSAGE = {
  :on => "Available",
  :away => "Away",
  :off => "" # moot anyway
}

$STATUS = {
  :Skype => {
    :off => "OFFLINE",
    :on => "ONLINE",
    :away => "AWAY"
  },
  :Adium => {
    :off => OSA::Adium::ASST::OFFLINE,
    :on => OSA::Adium::ASST::AVAILABLE,
    :away => OSA::Adium::ASST::AWAY    
  },
  :iChat => {
    :off => OSA::IChat::MSTA::OFFLINE,
    :on => OSA::IChat::MSTA::AVAILABLE,
    :away => OSA::IChat::MSTA::AWAY
  }
}

def is_known_status?(app, status)
  $STATUS[app].has_key? status
end    

def set_Skype_status_to(status)
  if not is_known_status? :Skype, status
    # No custom statuses with Skype, sorry!
    status = :away
  end
  app = get_app “Skype”
  request = “SET USERSTATUS #{$STATUS[:Skype][status]}”
  app.send2 request, “”
end

def set_Adium_status_to(status)
  if is_known_status? :Adium, status
    $Adium.adium_controller.my_status_type = $STATUS[:Adium][status]
    $Adium.adium_controller.my_status_message = $MESSAGE[status]
  else
    $Adium.adium_controller.my_status_type = $STATUS[:Adium][:away]
    $Adium.adium_controller.my_status_message = status.to_s
  end    
  if status == :on
    $Adium.adium_controller.accounts.each { |a| a.connect }
  end
end

def set_iChat_status_to(status)
  if is_known_status? :iChat, status 
    $iChat.status = $STATUS[:iChat][status]    
    $iChat.status_message = $MESSAGE[status]
  else
    $iChat.status = $STATUS[:iChat][:away]
    $iChat.status_message = status
  end
end

status = ARGV[0].intern
set_Skype_status_to status
set_Adium_status_to status
set_iChat_status_to status