Difference between revisions of "Development:Camino AppleScript Guide"
Jump to navigation
Jump to search
(→Migrating Scripts from Camino 1.5 to Camino 1.6: add notes about gurl events and window->browserwndow) |
|||
Line 23: | Line 23: | ||
==Migrating Scripts from Camino 1.5 to Camino 1.6== | ==Migrating Scripts from Camino 1.5 to Camino 1.6== | ||
− | * <code>open URL</code> and <code>Get URL</code> have been replaced by <code>open location</code> | + | * The <code>open URL</code> and <code>Get URL</code> commands have been replaced by <code>open location</code>. Compiled scripts should handle this change automatically in most cases. |
− | * <code>window</code> | + | * The <code>window</code> class now properly refers to all open windows (including the Downloads and Preferences windows). To target a browser window, use <code>browser window<code> instead. |
==Implementing Toolbar Script Items== | ==Implementing Toolbar Script Items== |
Revision as of 23:47, 10 December 2007
The following page is a guide to the AppleScript features available in Camino 1.6.
Camino 1.6 features significant improvements in AppleScript support over previous versions of Camino. Some of these improvements required incompatible changes to commands and properties. Many scripts will continue to work correctly in Camino 1.6; however, scripts that use certain commands and properties, and text scripts (.applescript), will need changes in order to continue functioning.
Contents
New in Camino 1.6
- Browser Windows and Tabs
- Browser windows can now be referenced specifically. Previously, Camino only exposed windows in general, including the Preferences window and the Downloads window in the same collection as browser windows.
- Browser windows contain tabs.
- Tabs can be addressed individually, exposing the title and URL of each page the user has open.
- Bookmarks
- Bookmarks and bookmark folders can be read, added, and modified by AppleScripts. (But see important point below. [Not added yet])
(pull from Development:Summer_of_Code_2007:AppleScript:Proposal?)
Anomalies in the Camino AppleScript Dictionary
- item
sample
- Bug 394821 [this is the important note referenced above]
- Although the
make
command is present, it is currently not possible tomake new tab
ormake new browser window
. For technical information about the reasons for this, see this blog post.
Migrating Scripts from Camino 1.5 to Camino 1.6
- The
open URL
andGet URL
commands have been replaced byopen location
. Compiled scripts should handle this change automatically in most cases. - The
window
class now properly refers to all open windows (including the Downloads and Preferences windows). To target a browser window, usebrowser window
instead.
Implementing Toolbar Script Items
- info
- info
- See Introducing Toolbar Scripts (Again) and Pimp Your Toolbar for more information.