stuck an error print in wintables if self.window doesn't exist
This commit is contained in:
+6
-3
@@ -57,8 +57,12 @@ class Table(Table_Window):
|
|||||||
self.window = hwnd
|
self.window = hwnd
|
||||||
break
|
break
|
||||||
|
|
||||||
if self.window == None:
|
try:
|
||||||
print "Window %s not found. Skipping." % search_string
|
if self.window == None:
|
||||||
|
print "Window %s not found. Skipping." % search_string
|
||||||
|
return None
|
||||||
|
except AttributeError:
|
||||||
|
print "self.window doesn't exist? why?"
|
||||||
return None
|
return None
|
||||||
|
|
||||||
(x, y, width, height) = win32gui.GetWindowRect(hwnd)
|
(x, y, width, height) = win32gui.GetWindowRect(hwnd)
|
||||||
@@ -149,4 +153,3 @@ class Table(Table_Window):
|
|||||||
|
|
||||||
def win_enum_handler(hwnd, titles):
|
def win_enum_handler(hwnd, titles):
|
||||||
titles[hwnd] = win32gui.GetWindowText(hwnd)
|
titles[hwnd] = win32gui.GetWindowText(hwnd)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user