Forum Discussion
To test this make sure you have something in your Clipboard.
Make a new test that Ctrl clicks the notepad window.
Then press v.
Aliases.Notepad.wndNotepad.NotepadTextBox.RichEditD2DPT.Click(143, 67, skCtrl);
Aliases.Notepad.wndNotepad.NotepadTextBox.RichEditD2DPT.Keys("v");
It only presses v but the content of my clipboard gets copied into notepad like it was pressing ctrl+v
I have a simple script to select multiple files in Explorer by holding Ctrl key and clicking the appropriate files.
function Explorer()
{
// Select multiple files via Ctrl and Click
let items = Sys.Process("explorer").Form("C:\\Temp - File Explorer").Panel("C:\\Temp").Window("DUIViewWndClassName", "", 1).Pane("Explorer Pane").Window("CtrlNotifySink", "", 5).Panel("Shell Folder View").List("Items View");
items.ListItem("Results").Click(-1, -1, skCtrl);
items.ListItem("Download").Click(-1, -1, skCtrl);
items.ListItem("FrameSupportSample").Click(-1, -1, skCtrl);
items.Click(-1, -1, skNoShift);
}
It works. However, the Ctrl key seems to be always pressed, even after inserting the last line to perform skNoShift. I don't use Click + Shift/Ctrl/Alt in my scripts, but the behaviour it is definitely not correct. It's definitely a bug! As a workaround, you have to press the Ctrl key again, to release it!
Great find, but how on earth did it pass their regression tests 😡. Ensure you open a support ticket.
- MW_Didata3 days agoSuper Contributor
I only have 1 test where ctrl click is used about 4 times.
For now this test is disabled.
I have made a Support Ticket.
As a temporary workaround i used this:obj.Click(-1, -1, skCtrl); //Ctrl doesn't get released
obj.Keys("^[Release]"); //Manually release the Ctrl (^) button