Is it possible to perform something like a mouse click while SHIFT/CONTROL/ALT key is pressed?
Bob
Combining keyboard with mouse
I'm sorry, we have some undocumented features, but the answer is yes:bob wrote:Is it possible to perform something like a mouse click while SHIFT/CONTROL/ALT key is pressed?
Code: Select all
form.SendKeys("{SHIFTDOWN}{CTRLDOWN}{ALTDOWN}");
Application.Sleep(100);
Mouse.Click(MouseButtonType.LeftButton);
form.SendKeys("{SHIFTUP}{CTRLUP}{ALTUP}");
Code: Select all
Application.SendKeys("{SHIFTDOWN}{CTRLDOWN}{ALTDOWN}");
Application.Sleep(100);
Mouse.Click(MouseButtonType.LeftButton);
Application.SendKeys("{SHIFTUP}{CTRLUP}{ALTUP}");
Ranorex Team
Thanks for the help.
This seems the C code to me, I am using python. What I have tried in python is:
with
However the "e" and mouseclick are received, but the SHIFTDOWN is not (also when i manually click afterward, any ideas?
This seems the C code to me, I am using python. What I have tried in python is:
Code: Select all
app = R.FormGetActive()
R.ControlSendKeys(app,"e")
R.ControlSendKeys(app,"{SHIFTDOWN}")
R.Sleep(1000)
R.MouseClick(R.MOUSE_LEFT_BUTTON,1)
Code: Select all
import RanorexPython as R
You should use HWND=0 for the CTRL, ALT and SHIFT keys:
Gabor Herget
Ranorex Team
Code: Select all
Ranorex.ControlSendKeys(textBox,'abc')
Ranorex.ControlSendKeys(0,'{SHIFTDOWN}')
Ranorex.ControlSendKeys(textBox,'efg')
Ranorex.ControlSendKeys(0,'{SHIFTUP}')
Ranorex Team