Ruby

Posted on
Wed Feb 28, 2007 7:25 pm
gregjsmith offline
Posts: 946
Joined: Apr 01, 2003
Location: Rio Rancho, NM

Ruby

For those that don't care for applescript

http://www.macdevcenter.com/pub/a/mac/2 ... -ruby.html

Posted on
Thu Mar 01, 2007 9:49 am
ajturner offline
Posts: 160
Joined: Jul 10, 2005
Location: Washington, DC

(No subject)

very cool.

It's not just for "replacing" Applescript, but somethings are much easier to do in Ruby.

So if you end up writing some scripts in Ruby, since Indigo doesn't currently support executing command line apps, you can still do:

1. Execute Applescript
2. do shell script "ruby /path/to/ruby/script"

There is also appscript for doing the same bridging Python and Applescript

Control Indigo from anywhere in the world:
http://highearthorbit.com/software/indigowidget

Posted on
Thu Mar 01, 2007 12:06 pm
gregjsmith offline
Posts: 946
Joined: Apr 01, 2003
Location: Rio Rancho, NM

(No subject)

ajturner wrote:
It's not just for "replacing" Applescript, but somethings are much easier to do in Ruby.


Really, like what? Other than this article I've never seen a bit of ruby code.

Posted on
Thu Mar 01, 2007 2:37 pm
ajturner offline
Posts: 160
Joined: Jul 10, 2005
Location: Washington, DC

(No subject)

Well, internet services are very nice to call and get data from. Any kind of text parsing. So I have scripts to update my Pertelian LCD and my NabazTag that are fired off by Indigo Actions.

So now I could imagine using Ruby (or Python) to call Indigo actions or devices. Ruby has excellent hash/array organization, so can use it to get a list of devices and maybe make a report of their status or histories.

Another example, I have code via the RubyCocoa bridge to react to commands from my Apple Remote. So I can tie that into action groups or devices.

Still have to think through the ideas - but expanding the scriptability of applications to other languages, each with strenghts, is amazing. (Fare thee well VB)

Control Indigo from anywhere in the world:
http://highearthorbit.com/software/indigowidget

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron