rb-appscript

How Do I Activate a specific Safari Window using rb-appscript?

流过昼夜 提交于 2021-02-11 15:25:46
问题 I can't get rb-appscript to activate a specific Safari window. It is always activating the most recently active window. (in irb, assuming rb-appscript is already installed) require 'appscript' include Appscript safari = app 'Safari' safari.open_location "http://www.google.com" safari.open_location "http://www.apple.com" safari.open_location "http://www.bing.com" safari.documents.URL.get => ["http://www.bing.com/", "http://www.apple.com/", "http://www.google.com.ph/", "http://www.apple.com

iTunes 10.6.3 changes AppleScript interface?

偶尔善良 提交于 2019-12-06 07:28:40
问题 I have a simple Ruby script that uses the rb-appscript gem to control iTunes, and now that I've updated to iTunes 10.6.3, it appears to be broken. Prior to 10.6.3, this piece of code would work as expected to get the currently selected track(s): Appscript.app('iTunes').selection.get() Now it produces the following error: RuntimeError: Unknown property, element or command: 'selection' Edit: Just confirmed that this is also broken in py-appscript, so it's not isolated to rb-appscript. Which is

iTunes 10.6.3 changes AppleScript interface?

我的未来我决定 提交于 2019-12-04 14:56:37
I have a simple Ruby script that uses the rb-appscript gem to control iTunes, and now that I've updated to iTunes 10.6.3, it appears to be broken. Prior to 10.6.3, this piece of code would work as expected to get the currently selected track(s): Appscript.app('iTunes').selection.get() Now it produces the following error: RuntimeError: Unknown property, element or command: 'selection' Edit: Just confirmed that this is also broken in py-appscript, so it's not isolated to rb-appscript. Which is weird, because the following piece of actual AppleScript still works: tell application "iTunes" to get

Avoiding AppleScript through Ruby: rb-appscript or rubyosa?

眉间皱痕 提交于 2019-11-26 16:11:30
Hello fellow Mac rubyists and AppleScript haters, For those of you that have experience with both rubyosa and rb-appscript, I'd like the hear the pros and cons of each, which one you decided to stick with, and which one you'd recommend for a totally non-AppleScript savvy ruby old-timer. Also, are there any other options that I have missed? As an aside, any tips dealing with the AppleScript side of the equation (e.g. browsing dictionaries, etc.) are also welcome. Seeing some sample code also helps a lot. has Quoth kch: That's nice, but now I'm curious about how scripting bridge compares to

Avoiding AppleScript through Ruby: rb-appscript or rubyosa?

人走茶凉 提交于 2019-11-26 04:44:57
问题 Hello fellow Mac rubyists and AppleScript haters, For those of you that have experience with both rubyosa and rb-appscript, I\'d like the hear the pros and cons of each, which one you decided to stick with, and which one you\'d recommend for a totally non-AppleScript savvy ruby old-timer. Also, are there any other options that I have missed? As an aside, any tips dealing with the AppleScript side of the equation (e.g. browsing dictionaries, etc.) are also welcome. Seeing some sample code also