0

I want to switch on previous screen via below SikuliX 1.1.0 script but it is not working as needed and it seems that it skipping the below instruction:


KeyDown(Key.ALT)
type(Key.TAB)
keyUp()

Please guide if anybody have found solution on it ;)

sam m
  • 74
  • 1
  • 14

1 Answers1

1

If you want to press ALT + TAB, you could use the next command:

type("\t", KeyModifier.ALT)

Here you will find a similar answer to your question. Works for other key modifiers too.

Michael Becerra
  • 401
  • 1
  • 3
  • 15
  • I am looking around to just press n hold ALT key then press TAB key once and then keyUp() to switch on previous application's screen. – sam m Dec 26 '17 at 18:34
  • 1
    As [this](http://doc.sikuli.org/keys.html) link show, you have to try like this: type(Key.TAB, KeyModifier.SHIFT + Key.UP) – Michael Becerra Dec 26 '17 at 18:41
  • as per [RaiMan](https://dogfood.paddev.net/~raimund-hocke) comment in this [blog](https://answers.launchpad.net/sikuli/+question/238043) `keyDown` doesn't work in **SikuliX 1.1.0** , so please help me out to find codes in this function of `write`. – sam m Dec 26 '17 at 18:46
  • `write("#W5#S_#SPACE#S+#U%d#S-"%number_of_lines)` _SHIFT, SPACE available in below code but for TAB how should I write? any guess?_ `#W5 - after each real key wait 0.5 seconds #S_#SPACE - obvious ;-) #S+ - press and hold SHIFT key #U5 - 5 times UP key (after interpolation of number_of_lines by the Python format feature %) #S- release SHIFT key` – sam m Dec 26 '17 at 18:54