[meta] Improve Apple Event/AppleScript support

NEW
Unassigned

Status

Camino Graveyard
OS Integration
P3
normal
16 years ago
6 years ago

People

(Reporter: Simon Fraser, Unassigned)

Tracking

(Depends on: 7 bugs)

Details

(Reporter)

Description

16 years ago
It would be nice if Chimera had more complete support for Apple Events. We need
to support more of the old Spyglass AE suite (open URL, registering and
unregistering URL echo handlers etc), and add support for GetURL parameters to
specify the window and tab to load new URLs in. We should also allow access to
the current URL via Apple Events.

Longer term, it would be great to allow AE access to the DOM of a loaded document.

Comment 1

16 years ago
Related to bug 61356?
(Reporter)

Comment 2

16 years ago
It is somewhat related to bug 61356, but I can do things in Obj-C that would be
extremely hard in the Carbon/Classic build. I have some cunning plans...
Status: NEW → ASSIGNED

Comment 3

16 years ago
Not sure if this is related, but have noticed that there is a communication
breakdown between Chimera (using build 2002073005) and URL Manager Pro (3.0).
When you double-click a bookmark in the latter, Chimera comes to the front but
then it does nothing. So it is evidently receiving some kind of message, but
doesn't act on it.
(Reporter)

Comment 4

16 years ago
Input from a user:
You shouldn't have offered this :-) here's what I'd like to see:

1. make new bookmark with properties {name:a, location:b, keyword:c,
description:d} at bookmarkfolder "whatever"

2. set name/location/keyword/description of bookmark "name,id,etc" of
bookmarkfolder to "whatever"

3. import bookmarkfile filepath (with replacing) --import html or xml files

4. save bookmarkfile as htmlfile/xmlfile to filePath (with replacing)

5. get/save selection/contents/image of tab "name, id" of window "name, id" as
text/source

6. set loadpageToBackground to true/false

7. set enableJava/enableJavaScript to true/false

That's it for now, but I'll have a look to see what else could be useful. From
my perspective, I really would love to see Chimera be able to import its own XML
bookmark file via script control (see points 3 and 4 above). Right now, it will
only import HTML.
(Reporter)

Comment 5

16 years ago
More commments:
For the moment only, the " Get URL " command is active in the Navigator suite.

Get URL: Load a URL in the frontmost window
	Get URL  reference  -- the object for the command
add ->	[to  'fss
(Reporter)

Comment 6

16 years ago
Trying again with the rest of this comment:

Get URL: Load a URL in the frontmost window
	Get URL  reference  -- the object for the command
add ->	[to  'fss
(Reporter)

Comment 7

16 years ago
Third try; there was a null byte in my paste:

Get URL: Load a URL in the frontmost window
	Get URL  reference  -- the object for the command
add ->	[to  'fss
(Reporter)

Comment 8

16 years ago
Now i'm really pissed.

Get URL: Load a URL in the frontmost window
	Get URL  reference  -- the object for the command
add ->	[to  'fss ']  -- File into which to save resource located at URL.

It would be useful to add this commands :

do script: Execute script commands
-------------------------------
do script  string  -- JavaScript text to execute
	[window  integer]  -- optional Window Identifier (as supplied by the ListWindows
event) specifying context in which to execute the script
	[Result:   string]  -- Return value

PrintBrowserWindow: Print contents of browser window (HTML)
-------------------------------
PrintBrowserWindow  integer  -- Window Identifier of the window to print. No
value means print the frontmost browser window.

CloseAllWindows: Closes all windows
-------------------------------
CloseAllWindows
Result:   boolean  -- Success

CloseWindow: Close the window specified by either Window Identifier or Title. If
no parameter is specified, close the top window.
-------------------------------
CloseWindow
	[ID  integer]  -- ID of the window to close. (Can use -1 for top window)
	[Title  string]  -- Title of the window to close
Result:   boolean  -- Success

Activate: Activate Internet Explorer and optionally select window designated by
Window Identifier.
-------------------------------
Activate  integer  -- Window Identifier
Result:   integer  -- Window Identifier of window to activate

ListWindows: Returns list of Window Identifiers for all open windows.
-------------------------------
ListWindows
Result:   a list of list

GetWindowInfo: Returns a window info record (URL/Title) for the specified window.
-------------------------------
GetWindowInfo  integer  -- Window Identifier of the window
Result:   a list of list  -- 

ResizeWindow: Returns a window info record (URL/Title) for the specified window.
-------------------------------
ResizeWindow
	[Width  integer]  -- Window Width Size
	[Height  integer]  -- Window Heigh Size
(Reporter)

Comment 9

16 years ago
Comments from mailing list:

Since I also want a few additional scripting commands, should I add specific
requests to that bug or create a new entry? From a previous post, here's what
I'd like to see:

1. make new bookmark with properties {name:a, location:b, keyword:c,
description:d} at bookmarkfolder "whatever"

2. set name/location/keyword/description of bookmark "name,id,etc" of
bookmarkfolder to "whatever"

3. import bookmarkfile filepath (with replacing) --import html or xml files

4. save bookmarkfile as htmlfile/xmlfile to filePath (with replacing)

5. get/save selection/contents/image of tab "name, id" of window "name, id" as
text/source

6. set loadpageToBackground to true/false

7. set enableJava/enableJavaScript to true/false

Comment 10

16 years ago
If I may make a suggestion, could these new commands be less programmer-ish? In
particular, it would be nice to avoid intercapping and run-together words. For
instance, "set enableJava to true" would be better as "set Java enabled to
true". Good dictionaries (the Finder's is one) make extensive use of spaces in
their terminology.

Also, it's nice to have utility commands but they should be balanced against
existing language features. "ListWindows" is nice, but "every window" is a
preferred construct as it is much more likely to be implemented by other
applications. Finder, for instance, allows me to say "close every window" and it
would be fantastic to be able to tell Chimera the same thing instead of relying
on a nonstandard verb.

Comment 11

16 years ago
I've been seeing this type of issue with Notes, iChat and Yahoo! Messenger when
I click a URL in an email or message, Chimera comes to the front but does not
load the URL.  If Chimera is not running, it launches and loads the page.
(Reporter)

Updated

13 years ago
Priority: -- → P3
Target Milestone: --- → Camino1.2
(Reporter)

Updated

13 years ago
Depends on: 160106
Component: General → OS Integration
QA Contact: winnie → os.integration

Updated

11 years ago
Duplicate of this bug: 380580

Comment 13

11 years ago
Since this bug is really broad, I'm making it a tracker for all our individual AE/AS bugs. As people do work on any of the suggestions here, they should probably be split out into new bugs that block this one.
Assignee: sfraser_bugs → nobody
Status: ASSIGNED → NEW
Summary: Improve Apple Event support → [meta] Improve Apple Event/AppleScript support
Target Milestone: Camino1.6 → ---

Updated

11 years ago
Depends on: 391683
You need to log in before you can comment on or make changes to this bug.