how to select all files in a disk

Asked by lijunwei

when i code like

click(file in my disk)
keyDown("ctrl+a")
keyUp()

the file i want to select all did not be selected by key Down("ctrl+a")

please tell me whether the fuction i use is right or wrong

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

ctrl has to be written as Key.CTRL (see docs) and without looking into the code, I think KeyDown/Up expect a list of keys, so try:

keyDown(Key.CTRL, "a")
keyUp()

or

keyDown(Key.CTRL)
keyDown("a")
keyUp()

but why not use:

type("a", KEY_CTRL)

???

Can you help with this problem?

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

To post a message you must log in.