Skip to content

Commit e57bee8

Browse files
committed
Merge branch 'master' of github.com:shidenggui/easytrader
2 parents 28365a9 + a79b6b0 commit e57bee8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

easytrader/yh_clienttrader.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _set_login_password(self, password):
102102
win32gui.SendMessage(input_hwnd, win32con.WM_SETTEXT, None, password)
103103

104104
def _has_login_window(self):
105-
for title in [' - 北京电信', ' - 北京电信 - 北京电信']:
105+
for title in [' - 北京电信', ' - 北京电信 - 北京电信', ' - 北京联通1']:
106106
self.login_hwnd = win32gui.FindWindow(None, title)
107107
if self.login_hwnd != 0:
108108
return True
@@ -290,7 +290,7 @@ def get_position(self):
290290
@staticmethod
291291
def project_copy_data(copy_data):
292292
reader = StringIO(copy_data)
293-
df = pd.read_csv(reader, delim_whitespace=True)
293+
df = pd.read_csv(reader, sep = '\t')
294294
return df.to_dict('records')
295295

296296
def _read_clipboard(self):
@@ -311,11 +311,13 @@ def _read_clipboard(self):
311311
@staticmethod
312312
def _project_position_str(raw):
313313
reader = StringIO(raw)
314-
df = pd.read_csv(reader, delim_whitespace=True)
314+
df = pd.read_csv(reader, sep = '\t')
315315
return df
316316

317317
@staticmethod
318318
def _set_foreground_window(hwnd):
319+
import pythoncom
320+
pythoncom.CoInitialize()
319321
shell = win32com.client.Dispatch('WScript.Shell')
320322
shell.SendKeys('%')
321323
win32gui.SetForegroundWindow(hwnd)

0 commit comments

Comments
 (0)