0

I'm trying to translate the following piece of code into Ruby using the rb-appscript gem:

tell application "System Events" to tell process "Dock"
    set dock_dimensions to size in list 1
    set dock_height to item 2 of dock_dimensions
end tell

I'm a little stuck. I can't figure out what to do with the list part. Here's what I have so far:

puts Appscript.app.by_name("System Events").processes["Dock"]

I'd appreciate any help.

ziganotschka
  • 25,866
  • 2
  • 16
  • 33
LandonSchropp
  • 10,084
  • 22
  • 86
  • 149

1 Answers1

1

Like this :

puts Appscript.app.by_name("System Events").processes["Dock"].lists[0].size.get[1]

lists and size are array.

jackjr300
  • 7,111
  • 2
  • 15
  • 25