sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #24163
Re: [Question #243910]: Keyboard shortcut not working as expected
Question #243910 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/243910
Description changed to:
Hey there,
I'm trying to minimize a command prompt window by using a keyboard
shortcut (Alt + Space + N) but it's not working as intended. My code is
as follows:
switchApp("cmd.exe")
type("n" + Key.SPACE, KeyModifier.ALT)
My log shows:
[log] App.focus cmd.exe(0) #0
[log] ( Alt ) TYPE " n"
It shows that there is a space before the n, but I don't want that, I
want to execute the full keyboard shortcut. How can I do this?
Thanks.
EDIT: After some experimentation I managed to find a solution:
switchApp("cmd.exe")
type(Key.SPACE, KeyModifier.ALT)
type('n')
That works well and good.
comment from RaiMan:
... and that is exactly as it should be done, because with the wrong version the alt key is held down with the space AND the n and this is another key sequence as needed.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.