app.focus() resulting in negative x and y values
So I'm using app.focus() to focus on an application for memu, and it results in an error like this:
[error] Region(
[error] script [ C:\Users\Yongho Lee\Desktop\
[error] java.lang.
[error] --- Traceback --- error source first
line: module ( function ) statement
123: main ( focus_window ) while not (memu_window.
145: main ( collect_exped ) focus_window()
[error] --- Traceback --- end --------------
The problematic portion of the code looks like this:
def focus_window():
global memu_window
myApp = App.focus("MEmu")
memu_window = myApp.focusedWi
memu_window.
loop_count = 0
while not (memu_window.
myApp = App.focus("MEmu")
memu_window = myApp.focusedWi
It's supposed to focus on the memu window and return back its coordinates to another function.
The error occurs when the code tries to initiate (memu_window.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Yongho Lee
- Solved:
- Last query:
- Last reply: