Lost password? | Help

[ advanced search ]

Hotclick search in new window, backround, can it be done?

Forums » Opera Community » General Opera topics » Customizing Opera

Go to last post

Tuesday, 29. August 2006, 12:55:29

del123

avatar

Posts: 114

Hotclick search in new window, backround, can it be done?

I'm talking about

[Hotclick Popup Menu]
Item, 65184 = Hotclick search, 200

And if it can be combined anyhow with:

open link in background page
open link in new page

Because when i read a long document, i want to select and lookup certain words in the background, so i can jump to it when i'm done reading, not right away.

Wednesday, 30. August 2006, 14:45:55

del123

avatar

Posts: 114

Yep, that works.

Thanks :up:.

Friday, 1. September 2006, 10:00:47 (edited)

del123

avatar

Posts: 114

After playing around with the standard_menu.ini i came up with another solution:

the search in new tab workaround:

[Hotclick Popup Menu]
Item, Google = copy & new page & go to page, "http://www.google.com/search?q=%c"
Item, Google images = copy & new page & go to page, "http://images.google.com/images?q=%c"

and the search in background version:

For this one to work you first have to set:
opera:config#UserPrefs|WindowCycleType to 2 (no list)
opera:config#UserPrefs|AlternativePageCycleMode to 0 (recently used order)

Item, Google background = copy & new page & go to page, "http://www.google.com/search?q=%c" & switch to previous page
Item, Google images background = copy & new page & go to page, "http://images.google.com/images?q=%c" & switch to previous page

Homer: Doh!


Sunday, 1. October 2006, 20:47:04

crazybilly

avatar

Posts: 100

is there a way to assign this to a hotkey? right now, I've got 'j' assiged to 'hotclick search'. I'd love to have actually open in a new background tab rather than use the current tab....right-clicking and selecting it while holding shift+ctrl ain't bad, but being able to do in one fell swoop is even better....thanks!

Monday, 2. October 2006, 14:51:10

del123

avatar

Posts: 114

Just asign either line from above as the key action, and it will work.

(that means, replace 'hotclick search' with 'copy & new page & go to page, "http://www.google.com/search?q=%c" & switch to previous page').

Also don't forget to set WindowCycleType to 2 and AlternativePageCycleMode to 0, or it won't work.



Monday, 2. October 2006, 19:29:22

HaJotKE

Grumbling Hyper-Critical Cantankerous Curmudgeon!

avatar

Banned User

Germany

Originally posted by del123:

Also don't forget to set WindowCycleType to 2 and AlternativePageCycleMode to 0, or it won't work.

All these settings should OPERA allow to be included into the commands of menus, buttons or shortcuts on a temporary basis...
i.e. only being active for just the time that command is executed!
M/B something for the wish-list :D

Thursday, 5. October 2006, 04:57:44

See here an excerpt of my modification, I find it works better than "switch to previous page" as it would go back to the tab before the newly opened one: not good when you want to search for several things and leave them all in the background.

Item, Search = copy & new page & go to page, "http://www.google.com.au/search?q=%c" & cycle to next page



Hope this helps anyone.

Thursday, 5. October 2006, 05:31:53

crazybilly

avatar

Posts: 100

hmmmm...i tried those (and made sure I changed the things in opera:config), but it's being wonky: it opens the new search, but the tab switcher stays open, like I was holding down ctrl after hitting ctrl+tab once, and it doesn't go back to the previous page.

Thursday, 5. October 2006, 05:45:05

crazybilly

avatar

Posts: 100

Ok, I ended up writing an autohotkey script to do it. Here it is:

^+j::
Send, ^c
Send, ^n
Send, g{space}
Send, ^d
Send, ^{tab}
return


When I hit ctrl+shift+j, it copies the highlighted text, opens a new tab, types 'g [paste and go]' and ctrl+tabs back to where I was. It works really well, actually. enjoy.

Thursday, 5. October 2006, 12:16:23

del123

avatar

Posts: 114

emmiejaye: i also tried 'cycle to' first, but it only workied while searching from the last tab, while 'switch to' switches back from any tab

crazybilly: check preferences/advanced/tabs if 'when cycling..' is set to 'cycle without showing list', or not, nice workaround

and btw.

screenshot of my current setup

[Hotclick Popup Menu]
Item, Google = copy & go to page, "http://www.google.com/search?q=%c"
Item, Google new = copy & new page & go to page, "http://www.google.com/search?q=%c"
Item, Google background = copy & new page & go to page, "http://www.google.com/search?q=%c" & cycle to next page
Item, Google images = copy & go to page, "http://images.google.com/images?q=%c"
Item, Google images new = copy & new page & go to page, "http://images.google.com/images?q=%c"
Item, Google images background = copy & new page & go to page, "http://images.google.com/images?q=%c" & cycle to next page
--------------------1
Item, Copy=Copy
Item, Go to =Go to page, "%t"
Item, Go to new=copy & new page & go to page, "%c"
Item, Go to background=copy & new page & go to page, "%c" & cycle to next page

Friday, 6. October 2006, 20:37:34

szyk

avatar

Posts: 3487

Originally posted by del123:

Hotclick search in new window, backround, can it be done?


Another method: :smile:

Item, "Search in Google"= Go to page, "javascript:var TEKST='%t';var adres='http://www.google.com/search?q='+TEKST+'&sourceid=opera&num=100&ie=utf-8&oe=utf-8';window.open(adres,'_blank').blur();"

Friday, 6. October 2006, 21:12:00

crazybilly

avatar

Posts: 100

ah! that works really well. I'd say better than my autohotkey script, which I'll have to mod to copy ANY text from anywhere and post it as a google search in Opera, hehehe

Can you walk me through how it works? I don't know much about javascript. But I'd like to!

Thanks!

Saturday, 7. October 2006, 08:03:14

szyk

avatar

Posts: 3487

Originally posted by crazybilly:

Can you walk me through how it works?


var TEKST='%t';

variable TEKST = sellected phrase in page, for example opera

var adres='http://www.google.com/search?q='+TEKST+'&sourceid=opera&num=100&ie=utf-8&oe=utf-8';

In variable adres phrase opera replaces variable TEKST (we get: adres= http://www.google.com/search?q=opera&sourceid=opera&num=100&ie=utf-8&oe=utf-8)

window.open(adres,'_blank').blur();

Then Opera opens address http://www.google.com/search?q=opera&sourceid=opera&num=100&ie=utf-8&oe=utf-8 in new page, but removes focus (function blur())

Originally posted by crazybilly:

I don't know much about javascript.


I too. :wink:
I found this method in forum: http://my.opera.com/userjs/forums/findpost.pl?id=1446938 .

Saturday, 7. October 2006, 13:01:47

del123

avatar

Posts: 114

Great work szyk, two thumbs up for that :up:.

My version:
Item, Google background = Go to page, "javascript:var slctxt='%t';var url='http://www.google.com/search?q='+slctxt+'';window.open(url,'_blank').blur();"

Item,  Go to background = Go to page, "javascript:var slctxt='%t';var url=''+slctxt+'';window.open(url,'_blank').blur();"


I also added this to the Opera wiki: Tip #68: Advanced go to & hotclick popup menu searching.

szyk: if you want credit on the wiki just say, and i'll change it from some guy figured it out to szyk did it :smile:.

Saturday, 7. October 2006, 14:00:58

szyk

avatar

Posts: 3487

Originally posted by del123:

szyk: if you want credit on the wiki


No, it doesn't matter for me. :wink:

Sunday, 8. October 2006, 20:25:53

crazybilly

avatar

Posts: 100

awesome. thanks for the walkthough--looks pretty simple!

Saturday, 4. November 2006, 23:39:55

del123

avatar

Posts: 114

I saw in another thread..

Originally posted by shoust:

@Tamil -- I find "minimize page" to work better than "Switch to previous page" as it works regardless if you have "Open new tab next to active" option on or not.



..and was like, doh, right! We can also apply that here!

Doing search in background using "minimize page" seems to be the easiest method:

Item, Google background = copy & new page & go to page, "http://www.google.com/search?q=%c" & minimize page


No changing settings, no javascript, works ootb. This sure is now my method of choice.

Two thumbs up!

Forums » Opera Community » General Opera topics » Customizing Opera