Windows: MS VisualStudio: type("4", KEY_ALT) not working?
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\
SetFocusLoc
File "C:\Users\
type( Key.4, KEY_ALT )
File "C:\Program Files (x86)\Sikuli X\sikuli-
Line 77, in file C:\Users\
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?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: