Author |
Topic |
|
Rob
USA
2615 Posts |
Posted - 12/27/2011 : 10:21:44
|
Here's a script that will open a link in a new tab in Chrome. It performs a right-click at the location the gesture started, then sends the down key (to select "Open in new tab" from the popup menu) and sends the Enter key. Finally, it moves the mouse back to the location where the gesture ended (puts the mouse back where it was) and sends CTRL+TAB to switch to the next tab (the newly opened tab, in theory). Could be some kinks with timing if your system is sluggish in displaying the popup menu inside Chrome, could add an acDelay(200) after acMouseClick(), play around with it and see.
acMouseClick(sp_gesture_start_x, sp_gesture_start_y, 0, 1, 1) acSendKeys("{DOWN}~") acMouseMove(sp_gesture_end_x, sp_gesture_end_y) acSendKeys("^{TAB}")
|
|
Rob
USA
2615 Posts |
Posted - 12/27/2011 : 15:32:58
|
Well, in my pursuit of doing things the right way...I've added some new actions in 1.0.9 to handle sending Ctrl, Alt, Shift, and Win down and up events independently..in this instance, it made more sense to be able to CTRL+Click instead of the hokey use of the context menu.
So this one does a control+click on the link, then pauses for 300ms and sends CTRL+TAB to switch to the new window (I have Chrome setup to open new tabs in the background).
acSendControlDown() acMouseClick(sp_gesture_start_x, sp_gesture_start_y, 2, 1, 1) acSendControlUp() acMouseMove(sp_gesture_end_x, sp_gesture_end_y) acDelay(300) acSendKeys("^{TAB}") |
|
|
JohnR
USA
1 Posts |
Posted - 02/23/2016 : 07:58:09
|
Ummm...I don't mean to sound like a party pooper, but your mouse already has this functionality: select the link using the middle (scroll wheel) click.
The shortcut to open a new tab is Ctrl+T.
Center clicking the link opens the tab to the background (as you stated is your default config) so...if you wanna open a link in a new tab and jump to it: make the gesture simulate the middle click followed by Ctrl+9
...or, you could just select the link and drag it to the tab bar for the same effect. (dragging the link out of the window will give you a new window, respectively). |
Edited by - JohnR on 02/23/2016 08:03:09 |
|
|
Rob
USA
2615 Posts |
Posted - 02/23/2016 : 08:01:08
|
I'm aware of that. I honestly just don't prefer the movement from the mouse buttons where my fingers naturally rest. :) |
|
|
|
Topic |
|
|
|