Originally Posted by: Rob 
Oops! I forgot your Ctrl+T part of the script, also added some extra delay after the control down call, again to allow time for the key event to be recognized (on my PC, anyway)
Code:var open_link_in_background = false;
var clicked = false;
sp.ConsumePhysicalInput(true);
for(var Y = action.Start.Y; Y <= action.Start.Y + 6; Y += 2) {
sp.MouseMove(new Point(action.Start.X, Y));
sp.Sleep(20);
if(sp.GetCurrentMouseCursor() == "Hand") {
if(open_link_in_background) {
sp.MouseClick(new Point(action.Start.X, Y), MouseButtons.Middle, true, true);
} else {
sp.SendControlDown();
sp.Sleep(100);
sp.MouseClick(new Point(action.Start.X, Y), MouseButtons.Left, true, true);
sp.SendControlUp();
}
clicked = true;
break; //Stop looping
}
}
if(!clicked) {
sp.SendKeys("^t"); // Send CTRL+T keystroke
}
sp.ConsumePhysicalInput(false);
sp.MouseMove(action.End);
Hi there!
Before in old SP i use this code:
-- this code does one of two things, if the mouse cursor
-- is a HAND, the link below the cursor is opened in a new
-- tab. If the mouse cursor is not a HAND, a new browser
-- tab is opened this action is executed by holding the
-- stroke button and clicking the left mouse button, either
-- over a link or anywhere over the browser for a new tab
--if acGetMouseCursorType() == "HAND" then
-- acMouseClick(gsx, gsy, 1, 1, 1)
--else
-- acSendKeys("^t")
--end
acConsumePhysicalInput(1) --prevent hand mouse movements from moving the mouse
acMouseMove(gsx, gsy) --move the cursor back to where the gesture began
acDelay(50) --pause briefly to allow the cursor to be drawn
if acGetMouseCursorType() == "HAND" then
acMouseClick(gsx, gsy, 1, 1, 1)
else
acSendKeys("^t")
end
acMouseMove(gex, gey) --move the mouse back to where the gesture ended
acConsumePhysicalInput(0) --allow input to behave as normal
Now i'm trying to use your new code, but i do something bad, because it opens new tab, but not link in new tab.
Please advice what and how to do.