sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #30812
Re: [Question #263112]: Command prompt - right click will not open contextmenu
Question #263112 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/263112
Status: Open => Answered
RaiMan proposed the following answer:
Not really sure, what you are trying to do.
--1. what Windows are we talking about?
on Windows 8 for example something like
type (Key.ESC, KEY_CTRL)
paste (r"Command P\n")
will open a new command window or switch to the already open one.
On Windows 7 this works similar, but I think it always opens a new
prompt.
So now you have a command window.
And what are you doing then with rightClick?
Open the context menu, select all and copy it?
this works on Win8:
type(Key.ESC, KEY_CTRL)
wait(1)
type("Command P\n")
wait(3)
win = App.focusedWindow()
# use context menu
win.rightClick()
type(Key.DOWN)
type(Key.DOWN)
type(Key.DOWN)
type(Key.DOWN)
type(Key.ENTER)
type(Key.ENTER)
# or use the window menu
type(" ", Key.ALT)
type("e")
type(Key.RIGHT)
type(Key.DOWN)
type(Key.DOWN)
type(Key.DOWN)
type(Key.ENTER)
type(Key.ENTER)
after this, the command window content is on the clipboard.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.