On Jul 14, 2007, at 1:51 PM, 12 34 wrote:

> Should be simple:
>
> require 'rubygems'
> require 'appscript'
> include Appscript
> urlFront = app('Safari').documents[1].url.get
> puts urlFront
>
> but doesn't work. In place of documents, I've tried window(s) too.

The following worked for me.

<code>
require 'appscript'
include Appscript
require "jcode"

$KCODE = "UTF8"

url_1 = app('Safari').documents[1].URL.get
puts url_1
</code>

Note that I used 'URL' not 'url'.

Regards, Morton