Adium
Dock Icons Emoticons Contact List Styles Message Styles Sound Sets AppleScripts Status Icons Service Icons Menu Bar Icons Plugins Miscellaneous All
Current Page

Current Page

Submitted By James Sinclair (megalogeek)

Description

Adds link insertions support like %_safari for Camino, Firefox, Mozilla and Netscape users.

Since none of these browsers support Applescript, these scritps are pretty much hacks, but the Firefox, Mozilla and Netscape scritps are ugly hacks. I tried all sorts of ways to get the URL from these browsers, but the only one that worked requires bringing the browser to the front for two seconds. It's ugly, but it works. If you can't live with that, sorry. The script does it all for you, but it's mildly annoying to have the browser pop forward for 2 seconds then go away again. Oh well.

Mozilla and Netscape both tag their own name onto the title of the browser window, so unfortunately, that'll show up in the link text.

FYI -> I'm working on Opera support, but it seems to be horribly Applescript impaired. I'll post a new version if I can get it working.

Comments

You can reply to individual comments by clicking the "Reply" link next to each.

# by BlueRevolution on 10/23/04 at 07:04:18

ouch that FireFox hack is an ugly one... nice work even so, I would've just given up :), like your commenting too. so, when do we get Opera, Mozilla, Netscape, In... no wait, forget that last one ;) if you're using... THAT on a mac you should be shot, plain and simple :)

# by Anonymous on 10/23/04 at 07:34:13

Even considering the v6+ versions of Netscape are just rebranded releases of Mozilla?

# by megalogeek on 10/23/04 at 20:59:21

I update it to v1.1 - This adds support for Mozilla & Netscape. Unfortunately, Opera support is not looking very likely at the moment. I might be able to get just the URL, but I can't seem to get the page title. Still, just a url is better than nothing.

I'm working on addimg more browsers too. OmniWeb and iCab look pretty easy because they are Applescriptable. Of course, it has occurred to me that not everyone will want to install all the scripts, so the next release will probably have extra .adiumscripts to install them individually.

I'm also looking at making a meta-script that will figure out which browser you have running and just use it (or give you a select list if there's more than one). That might take a little longer.

Hope you enjoy it.

--James

# by BlueRevolution on 10/23/04 at 23:52:21

if you want to get rid of the "mozilla" and "netscape" texts from the title just remove everything after the last hyphen in the returned string (gained from years of painful VB programming *shudder*)

# by on 02/05/05 at 05:30:41

Firefox actually has minimal scripting support. No need for all the icky UI scripting :)

Look at all the info this gets you:

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

# by schinckel on 08/14/05 at 09:47:42

With recent versions of Camino, you can replace all of the ugly code with:

on substitute()
tell application "Camino"
«class curl» of window 1
set myURL to the result
set myTitle to name of window 1
end tell
return "" & myTitle & ""
end substitute

(I hope this doesn't mangle my html, it's my first post).

It's faster, and no window popping.

# by schinckel on 08/14/05 at 09:49:21

I'll try again!


on substitute()
tell application "Camino"
«class curl» of window 1
set myURL to the result
set myTitle to name of window 1
end tell
return "<HTML><A HREF="" & myURL & "">" & myTitle & "</A></HTML>"
end substitute

Post a New Comment

You must be logged in to post comments.

Install | Download
31.83kb (558 downloads)

12345
3.20 / 84 votes
Current Version: 1.1
Last Updated: 10/23/04
Credits:
Loosley based on the Safari version included with Adium. I don't know who wrote that, but whoever it was, thanks!