def copy_data(self, hCtrl, key=0): # background mode
"?CVirtualGridCtrl|Custom<n>??????????????????"
if key:
self.switch_tab(self.two_way, key) # ?????('W')???('E')???('R')
start = time.time()
print("??????????????...")
# ?????????????3?...orz
for i in range(10):
time.sleep(0.3)
op.SendMessageW(hCtrl, MSG['WM_COMMAND'], MSG['COPY_DATA'], NODE['FORM'][-1])
ret = pyperclip.paste().splitlines()
if len(ret) > 1:
break
temp = (x.split('\t') for x in ret)
header = next(temp)
if '????' in header:
header.insert(header.index('????'), '??')
header.remove('????')
print('IT TAKE {} SECONDS TO GET REAL-TIME DATA'.format(time.time() - start))
return tuple(dict(zip(header, x)) for x in temp)
评论列表
文章目录