Is this possible in Opera: Add a menu item to link context menu to start an external program wit

Forums » General Opera topics » Customizing Opera

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

20. May 2010, 15:37:15

kongomongo

Posts: 7

Is this possible in Opera: Add a menu item to link context menu to start an external program wit

Hi guys,

I have been wondering if this is possible in Opera? In Firefox you can create an xpi in javascript to do this.

First I thought it might be doable with UserScript, but there seems to be no way to run .exe's on the local comp.
Then I thought maybe it could work via a mozilla plugin, but there I don't know how to link into the link-context menu.

My third idea would be to use the Opera Button code which seems to have a "run external app with parameter" command. But I have no idea to use that code in a menu?!

Thanks a lot in advance.

20. May 2010, 19:58:04 (edited)

Pesala

Reclining Buddha

Posts: 27328

Much the same in a menu as with a toolbar. Add an item like this to the [Link Popup Menu] section of your customised menu.

Item, "Open in Iron"=Execute program, "C:\Program Files\SRWare Iron\iron.exe", "%l",,"Iron"

The icon used in the menu ("Iron") depends on the skin — you can add custom icons to skins. Try my skins if you want lots of external program icons.

Your Skin's Images
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

20. May 2010, 19:45:33

ralfonat

Posts: 20

Thanks a lot mate!

The only problem is that %u seems to be the current document url, not the link target.

Fortunately there seems to be %l and %t. %l seems to work for the link popup menu.

To make this more advanced: Would the same technique work for selecting a large part of a document and rightclick -> send all links to external program?

Or alternatively use the Links Panel context menu to select a couple of links and right click -> send to external program?

My tests with %l and %t dont seem to work in those two cases.

20. May 2010, 19:57:40

Pesala

Reclining Buddha

Posts: 27328

Originally posted by ralfonat:

Fortunately there seems to be %l and %t. %l seems to work for the link popup menu.

Thanks — that was a bug introduced by me copy/pasting stuff from the [Document popup menu] section. I have fixed it.

Originally posted by ralfonat:

Would the same technique work for selecting a large part of a document and rightclick -> send all links to external program?

No. It would be copied as plain text.

Originally posted by ralfonat:

Or alternatively use the Links Panel context menu to select a couple of links and right click -> send to external program?

That works for opening tabs in the background etc., but I don't know how you would pass more than one link to an external program. Have you tried something like:

Item, "Open in Iron"=Execute program, "C:\Program Files\SRWare Iron\iron.exe", "%l %l %l %l %l",,"Iron"
Skins Tips Buttons Backup Security User Scripts Language Forums
Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs idea
Rules of Conduct and Posting RulesPlease Don't ShoutEditing PostsOpera Config Links

21. May 2010, 16:24:14

ralfonat

Posts: 20

Item, "Open in Iron"=Execute program, "C:\Program Files\SRWare Iron\iron.exe", "%l %l %l %l %l",,"Iron" doesnt seem to work, %l is empty :/(((

Do you think it would be achievable with browser/userscript or mozilla plugin (dll) ?

21. May 2010, 17:02:18

artmil

d(^_^)b

Posts: 368

Yea the only working solution in the link panel i found was
Item, "item_name" = Copy & Execute Program, "D:\app.exe","/commandlineparameter"

I simple copied the selected links to clipboard and launch my app with a parameter that told it to look in the clipboard for links.
But its a crappy solution especially if you have a clipboard manager for example ClipX.
The strange thing is that "Copy link & Execute Program" didn't work in the old builds(link panel) but Copy & Execute Program did work...

You could try to modify this script
http://my.opera.com/community/forums/topic.dml?id=206662
Krita.org
Opera: 12.1x

Forums » General Opera topics » Customizing Opera