Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
53 user(s) are online (37 user(s) are browsing Forums)

Members: 0
Guests: 53

more...

Support us!

Headlines






Contextual Menus for translate.google.com
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6374
@All
Can anybody help me with proper Contextual Menu entry which will translate me page via translate.google.com in the current tab ?

So far i have that:

CategoryPage
Label
translate
Action
rx "address ODYSSEY.1; OPEN NAME 'http://translate.google.com/translate?sl=auto&tl=en&u=' %u"


Problem with that one that once i had any "=" after translate part, then nothing works. Also i don't like that it's "odyssey.1" port, as i want it to works on all owb instances. Or maybe that can be done without Arexx ? And i want to avoid external scripts too if possible.

Thanks

   Report Go to top

Re: Contextual Menus for translate.google.com
Quite a regular
Joined:
2007/2/6 13:57
From Donostia (SPAIN)
Posts: 551
Seems prohlems if qith quotes on url, I couldn't make it wotk on a single line.

Just try this, but as a file.rexx (not sure if %u would be replaced by correct url):
/* */
ADDRESS ODYSSEY.1;
OPEN NAME '"'"http://translate.google.com/translate?sl=auto&tl=en&u="'%u"'

   Report Go to top

Re: Contextual Menus for translate.google.com
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6374
@Javier
Want to make it without external script, with external script that all can be done easyly of course.

Also in your example its again "Odyssey.1" , which mean only one instance of odyssey will be ok with. Second running odyssey window will open stuff in older owb which is with Odyssey.1 port , that thing i also want to avoid somehow.

   Report Go to top

Re: Contextual Menus for translate.google.com
Quite a regular
Joined:
2007/2/6 13:57
From Donostia (SPAIN)
Posts: 551
about port name , use "%p", but dunnot if it can be done in one line as you want.

If there is an ARexx (non)script expert out there, please heeeelp!!!

   Report Go to top

Re: Contextual Menus for translate.google.com
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6374
@Javier
Yeah, that one:

Quote:

rx "address %p; OPEN NAME 'https://translate.google.com'"


Make Odyssey port be used from the necesary owb instance, cool.

Now only to deal how to spend url to , and how to use "= & ? " things in the url, so all will works for that:


Quote:

'http://translate.google.com/translate?sl=auto&tl=en&u=' %u'".


That should be just something about " ' and stuff. On linux i easyly add backslash at begining of them, but do not remember how it all on amigaos. Maybe need double quotes few times ?

   Report Go to top

Re: Contextual Menus for translate.google.com
Not too shy to talk
Joined:
2006/12/6 20:39
From California, Unitied States
Posts: 330
@kas1e
Quote:
Can anybody help me with proper Contextual Menu entry which will translate me page via translate.google.com in the current tab ?


I don't remember why but this is what I use that works.

OPENURL "http://translate.google.com/translate?sl=auto&tl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=%u" NOLAUNCH

   Report Go to top

Re: Contextual Menus for translate.google.com
Just popping in
Joined:
2019/11/27 12:32
From RNO
Posts: 13
I've been using:
openurl "https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=%u"


But AFAIK openurl is 3rd party for OS4 and OS4 comes with URLOpen by default, but maybe it'll work with that too?

   Report Go to top

Re: Contextual Menus for translate.google.com
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6374
Still trying to make it via RX..

It seems that "rx" line do not like when there is "=" in the link. All the ? or & takes fine, but once there "=" things start bork.

I also tried to replace = on %3D, but that didn't help as well :(

   Report Go to top

Re: Contextual Menus for translate.google.com
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 6374
@jPV

That way it work too:

urlopen "https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=%u"


Through it open for me window with question in which browser do open stuff, and open it in new instance, not in the current window. Probably some option need to be send to as well.

   Report Go to top

Re: Contextual Menus for translate.google.com
Supreme Council
Joined:
2006/11/19 18:16
From London, England
Posts: 1324
That's because you have multiple browsers set up for https, so the URL handler asks you which one you want to use. AFAIK there is no way to force urlopen to use a specific browser. You could, however, simply disable any others you have set up, just leave Odyssey enabled.

Simon

   Report Go to top





[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project