Open Bug 125419 Opened 23 years ago Updated 2 years ago

[META]Add AppleScript support and capabilities to Mozilla on Mac, e.g. AppleScript/OSA Script menu

Categories

(Firefox :: General, enhancement, P5)

All
macOS
enhancement

Tracking

()

People

(Reporter: bugzilla, Unassigned)

References

(Depends on 8 open bugs)

Details

(Keywords: meta, Whiteboard: [bug 608049 may also have some useful info])

Add AppleScript support and capabilities to Mozilla on Mac OS 9 and X. This would include the Scripting Dictionary which is built-in to AppleScript compatible Mac applications, adding a Script menu to the menu bar, and adding "launch AppleScript" as an option in message rules.
Dup of bug 58590? Related: DoJavascript event: bug 5704 Better AE support: bug 5701 Implement advanced XPConnect-to-AppleScript/OSA glue layer: bug 61356
It is similar to those four bugs although still a little different. I would recommend leaving it as a separate bug although you could mark it as duplicate if needed. This bug is more of a summary of the entire problem, while the other bugs are more to individual issues with AppleScript.
Keywords: nsbeta1
Let's keep to one issue per bug, please. Making this one about adding the Script menu. Joel, please file another about message rules only.
Assignee: sspitzer → dbradley
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Component: Mail Window Front End → XPConnect
Ever confirmed: true
Keywords: meta
Product: MailNews → Browser
QA Contact: esther → pschwartau
Summary: Add AppleScript support to Mac OS 9 & X builds of Mozilla → Add AppleScript/OSA Script menu
Marking OS to "All" to include Mac OS 8, Mac OS 9 and Mac OS X. (Was: Mac OS 9)
OS: Mac System 9.x → All
Blocks: 158019
Should a meta bug be created, or this turned into that?
From Comment #2, sounds like this should be the meta bug. Reassigning to Tracking component and adding the bugs mentioned in Comment#1 as dependencies. If anyone knows of any other AppleScript issues filed in Bugzilla, please add them as dependencies, too -
Assignee: dbradley → chofmann
Component: XPConnect → Tracking
Depends on: 5701, 5704, 61356
QA Contact: pschwartau → chofmann
Summary: Add AppleScript/OSA Script menu → [META]Add AppleScript support and capabilities to Mozilla on Mac, e.g. AppleScript/OSA Script menu
Depends on: 160106
I add my bugs (or enhancements) bug 156010 bug 156013 bug 158386 bug 158388
Depends on: 156010, 156013, 156388, 158386
Depends on: 5705
OS should not be All (that includes LinuxPPC). Setting to 8.5, since that's the oldest supported Mac OS at this point.
OS: All → Mac System 8.5
Blocks: 164968
Depends on: 166199
No longer depends on: 156388
Depends on: 158388
Blocks: 158388
No longer depends on: 158388
Depends on: 149529
Shouldn't we move this to Mac OS X ? Mac OS 8.5 and 9 support is dead now ...
adt: removing nsbeta1 nomination; nominate bugs indiviually as appropriate.
Keywords: nsbeta1
Updating OS to a supported one.
OS: Mac System 8.5 → MacOS X
Blocks: 243543
*** Bug 308558 has been marked as a duplicate of this bug. ***
Depends on: 352254
No longer depends on: 160106
Any updates on this issue?
I've seen the lack of this noted on a couple reviews of the Firefox 3 betas recently. Certainly too major to make it into Firefox 3, but probably worth getting back on the radar. I think wanted-next would be more appropriate than wanted1.9.0.x, but it doesn't seem to want to let me pick that one.
Flags: wanted1.9.0.x?
Moving flags around since wanted1.9.1 and blocking1.9.1 now exist.
Flags: wanted1.9.1?
Flags: wanted1.9.0.x?
Flags: wanted1.9.0.x-
Flags: blocking1.9.1?
Flags: wanted1.9.1?
Flags: wanted1.9.1+
Flags: blocking1.9.1?
Flags: blocking1.9.1-
Broken AppleScript support in Firefox 3 cripples URL Manager Pro and other bookmark manager applications for Mac OS X because they cannot get the name and URL of the current web page. This was my experience in OS X 10.4.11 and now in OS X 10.5.5. I get a message that there is no browser running or there is no browser window open.
Comment 16 is bug 427448, which is fixed on the trunk.
Flags: wanted1.9.1+ → wanted1.9.1-
Lack of AppleScript support makes FF less useful for research because it doesn’t play well with desktop apps, like DevonThink, intended to compliment built in OS X technologies, such as AppleScript.
Depends on: 46407
It looks like it has been a very long time since this problem was first raised, and nothing so far has been done about it and no feedback is evident from Mozilla. There is still no support for Applescript in FF 3.6.3 (as of 5/8/2010) for Mac OSX (now at 10.6.3), and that means I still cannot use URL Manager Pro to manage cross browser bookmarks. Why has nothing been done about this?
This addition is important in so many ways to mac users... it makes me think that there must not be any mac users on the development team, otherwise this would have been done a long time ago. I should learn how to write for mozilla, but I think it may be a while before I understand it enough to fix this issue.
Yes, please add AppleScript support. Thanks!
Would someone at Mozilla please respond to these requests, or explain why this will/cannot be done?
We are aware that people want better AppleScript support but simply put, it has not been a high enough priority to get developer time. We would, of course, always accept a patch contribution. We don't need any more "me too" comments here, thanks.
Hardware: PowerPC → All
Curios, what is the state here? I actually only need to get the URL of the front window. This should be quite trivial on the Firefox site to be implemented. Why isn't it? I guess this would maybe take an hour or so to be implemented for someone who is not experienced with the Firefox/Mozilla source (excluding the time to setup the build environment -- no idea how complicated that is) and maybe about 5-10 minutes for someone who is. I would look at this (at least for just getting the URL) if I would know that this would be applied soon after to the stable branch and will got into FF4. (Otherwise it would be no use for me.) But mostly I am curios: Why haven't it been done already? Can someone give some technical details?
Depends on: 1127514
Assignee: chofmann → nobody
Component: Tracking → General
Flags: wanted1.9.1-
Flags: blocking1.9.1-
Priority: -- → P5
Product: Core → Firefox
QA Contact: chofmann
Whiteboard: [bug 608049 may also have some useful info]

Wow, 18 years to grab the current URL from the active tab? I am trying to dump Chrome forever but some automation/scripting that I rely on requires being able to programmatically obtain the current tab's URL from AppleScript or via some other CLI interface. Is there any way this can get some attention? Seems like the plumbing is already in place, since the following returns quite a lot of info about the current tab, just not the URI/URL.

tell application "Firefox"
	get properties of front window
end tell

For what it's worth, some hacky workarounds for this are discussed in this thread on the Keyboard Maestro forum. Although the details of that discussion are fairly specific to Keyboard Maestro, many of the same techniques could be achieved using 'plain' AppleScript, though with a little more effort required.

Depends on: 1655268

A contributor is working on this in bug 1655268.

A slightly simpler workaround than the ones linked to in Keyboard Maestro land is to use something like (or exactly) this extension:
https://github.com/erichgoldman/add-url-to-window-title / https://addons.mozilla.org/en-US/firefox/addon/add-url-to-window-title/

set extension preferences to show full url & then use a script like

on explode(delimiter, input)
	local delimiter, input, ASTID
	set ASTID to AppleScript's text item delimiters
	try
		set AppleScript's text item delimiters to delimiter
		set input to text items of input
		set AppleScript's text item delimiters to ASTID
		return input --> list
	on error eMsg number eNum
		set AppleScript's text item delimiters to ASTID
		error "Can't explode: " & eMsg number eNum
	end try
end explode

tell application id "org.mozilla.firefoxdeveloperedition"
	set wintitle to name of (get front window)
	
	return last item of my explode("- ", wintitle)
end tell
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.