New question #164548 on Sikuli:
https://answers.launchpad.net/sikuli/+question/164548
I am working on a script testing a plugin to MS Visual Studio. So far, using
"type()" to send hotkeys has worked just fine (e.g. type( "B", KEY_ALT +
KEY_SHIFT)).
So I want to send the hotkeys for switching focus to the Locals view in Visual
Studio:
switchApp("My Project (Debugging) - Microsoft Visual Studio")
type( "4", KEY_ALT)
I've also tried it as:
type(4, KEY_ALT)
type(Key.4, KEY_ALT)
But Sikuli doesn't like any of them:
[log] App.focus DataTypesVS10 (Debugging) - Microsoft Visual Studio(0) #0
[error] Stopped [error] An error occurs at line 43 [error] Error message:
Traceback (most recent call last):
File
"C:\Users\bgriffin.AMD\AppData\Local\Temp\sikuli-tmp4884278211712740274.py",
line 43, in
SetFocusLocals()
File
"C:\Users\bgriffin.AMD\Documents\VisualStudioLib.sikuli\VisualStudioLib.py",
line 116, in SetFocusLocals
type( Key.4, KEY_ALT )
File "C:\Program Files (x86)\Sikuli
X\sikuli-script.jar\Lib\sikuli\Region.py", line 59, in find
Line 77, in file
C:\Users\bgriffin.AMD\AppData\Local\Temp\sikuli-tmp4884278211712740274.py
Manually, "ALT+4" works fine. Not the Numpad "4", but the keypad "4".
In the Sikuli IDE, "type("4", KEY_ALT)" behaves odd; I expected KEY_ALT to
display in brown, just like all the other KEY_* keywords, but it displays in
black. The other two ways I tried (4, Key.4) cause KEY_ALT to display in
brown, but don't work.
Looking at the documentation, it appears the using type("4", KEY_ALT) should
work.
What should I be doing here?
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp