@@ -102,7 +102,7 @@ def _set_login_password(self, password):
102
102
win32gui .SendMessage (input_hwnd , win32con .WM_SETTEXT , None , password )
103
103
104
104
def _has_login_window (self ):
105
- for title in [' - 北京电信' , ' - 北京电信 - 北京电信' ]:
105
+ for title in [' - 北京电信' , ' - 北京电信 - 北京电信' , ' - 北京联通1' ]:
106
106
self .login_hwnd = win32gui .FindWindow (None , title )
107
107
if self .login_hwnd != 0 :
108
108
return True
@@ -290,7 +290,7 @@ def get_position(self):
290
290
@staticmethod
291
291
def project_copy_data (copy_data ):
292
292
reader = StringIO (copy_data )
293
- df = pd .read_csv (reader , delim_whitespace = True )
293
+ df = pd .read_csv (reader , sep = ' \t ' )
294
294
return df .to_dict ('records' )
295
295
296
296
def _read_clipboard (self ):
@@ -311,11 +311,13 @@ def _read_clipboard(self):
311
311
@staticmethod
312
312
def _project_position_str (raw ):
313
313
reader = StringIO (raw )
314
- df = pd .read_csv (reader , delim_whitespace = True )
314
+ df = pd .read_csv (reader , sep = ' \t ' )
315
315
return df
316
316
317
317
@staticmethod
318
318
def _set_foreground_window (hwnd ):
319
+ import pythoncom
320
+ pythoncom .CoInitialize ()
319
321
shell = win32com .client .Dispatch ('WScript.Shell' )
320
322
shell .SendKeys ('%' )
321
323
win32gui .SetForegroundWindow (hwnd )
0 commit comments