Sikuli script to press multiple key combinations in windows

Asked by ambiga

Hi,

How to write Sikuli scripting to perform multiple key operations. like CTRL+0, CTRL+ALT+DEL in windows

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#1

Check two sections of documentation:

Key Modifiers
http://doc.sikuli.org/keys.html#key-modifiers

Low-level Mouse and Keyboard Actions
http://doc.sikuli.org/region.html#low-level-mouse-and-keyboard-actions

, particularly keyDown(key | list-of-keys) and keyUp([key | list-of-keys])

Also you can find info in already answered questions, searching for "modifiers" or "key"

Like this, for example:
https://answers.launchpad.net/sikuli/+question/141032

Revision history for this message
ambiga (ambigaj) said :
#2

Thanks Roman. That solved my question.

Revision history for this message
ambiga (ambigaj) said :
#3

Thanks Roman Podolyan, that solved my question.

Revision history for this message
ambiga (ambigaj) said :
#4

Hi,

i want to perfomr CTRL+ALT+DEL operation and tried with the below code and it fails.

type(KEY_CTRL+KEY_ALT,key.DELETE)

Please help me in this.

Revision history for this message
RaiMan (raimund-hocke) said :
#5

the above mentioned docs really help ;-)

Revision history for this message
eduardobedoya (gonnabdh) said :
#6

Is there a syntax to press enter five times?
like...
type(Key.ENTER{5})

Thanks Advanced.

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#7

@eduardobedoya
To achieve that, type must be put into "For" loop.
Like this:

for i in Range(4):
    type(Key.Enter)

https://www.google.com/search?q=python+for+loop&ie=utf-8&oe=utf-8

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#8

Oops, sorry, Range(5), not 4.

Revision history for this message
eduardobedoya (gonnabdh) said :
#9

so there is not especial Sikuli syntax, only achievable through python loop

thanks

Can you help with this problem?

Provide an answer of your own, or ask ambiga for more information if necessary.

To post a message you must log in.