-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
财富证券同花顺客户端grid里的数据无法复制 #270
Comments
我也发现了这个问题,我用的是同花顺免费版v8.70.32版本。发现模拟Ctrl+A 然后Ctrl+C并不能复制。必须要模拟鼠标右键然后输入C才行。输入完c之后还要输入验证码。 代码大概这样: from captcha_recognize import captcha_recognize #引入验证码破解模块
from pywinauto import clipboard
grid = main.window(
control_id=0x417,
class_name='CVirtualGridCtrl'
) # 获取grid
grid.set_focus().right_click() #模拟右键
pywinauto.keyboard.SendKeys('c') # 输入C
file_path = "./captchas/" + str(uuid.uuid4()) + ".png"
app.top_window().window(
control_id=0x965,
class_name='Static'
).CaptureAsImage().save(file_path) #保存验证码
captcha_num = captcha_recognize(file_path) # 识别验证码
print(captcha_num)
app.top_window().window(
control_id=0x964,
class_name='Edit'
).set_text(captcha_num) # 输入验证码
app.top_window().window(
control_id=0x1,
class_name='Button'
).click() # 点击提交确认
print(clipboard.GetData()) # 显示剪切板数据 |
@nladuo
|
Closed
见 #272 提供我开发用的客户端版本 |
我提供的版本也不行了,这个目前没有想到特别好的办法 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
env
OS: win10
PYTHON_VERSION: 3.6.4
EASYTRADER_VERSION: 0.13.5
problem
我的券商客户端是##财富证券##的[同花顺新一代]独立委托,使用easytrader获取资金状况(balance)ok,但是获取持仓(position)就显示为空数组。
查看源代码后发现,
_get_grid_data
方法里的grid.type_keys('^A^C')
这行代码是复制grid里的所有行数据,但是我的客户端grid不支持复制,只能保存为.xls文件。难道每次查看持仓,都要保存为一个xls文件吗?然后再从xls文件中去复制?有没有好的办法推荐呢?
The text was updated successfully, but these errors were encountered: