找回密码
 加入
搜索
查看: 2052|回复: 2

[AU3基础] 怎样往招商证券全能版EDIT框里写证券代码?【已解决】

[复制链接]
发表于 2010-11-26 12:29:55 | 显示全部楼层 |阅读模式
本帖最后由 cfxqm 于 2010-11-29 00:06 编辑

我想编个股票自动交易程序,碰到个问题:编程往“证券代码”这一栏里写代码的时候,代码只是一闪就没了,而用键盘输入就有,我用程序中的几种方式都写不进去。是怎么回事呢?
软件代码:
Const $winname = "招商证券全能版"
$gui = WinGetHandle($winname)
WinActivate($winname)
WinActive($winname)
$h_tree = ControlGetHandle($winname, "", "SysTreeView321")
$hEdit = ControlGetHandle($winname, "", "Edit5")
ControlFocus($winname,"","SysTreeView321") 
ControlTreeView ($gui, "", $h_tree, "Expand", "Root")
ControlTreeView ($gui, "", $h_tree, "Select", "卖出")
Opt("MouseCoordMode", 2)
MouseMove ( 30, 710 )
MouseClick("left") ;点“卖出”
ControlFocus($winname,"","Edit5")
;ControlSend($winname, "", "Edit5", "600143" )
;ControlSetText($winname, "", "Edit5", "600143" ,1)
_GUICtrlEdit_SetText($hEdit,"600143")
;Send('600143')
;Send('{Enter}') 
图片如下:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

发表于 2010-11-26 14:24:08 | 显示全部楼层
好东西.........
 楼主| 发表于 2010-11-29 00:06:35 | 显示全部楼层
已解决
Const $winname = "招商证券全能版"
$gui = WinGetHandle($winname)
WinActivate($winname)
WinActive($winname)
$h_tree = ControlGetHandle($winname, "", "SysTreeView321")
$hEdit = ControlGetHandle($winname, "", "Edit5")
ControlFocus($winname,"","SysTreeView321") 
ControlTreeView ($gui, "", $h_tree, "Expand", "Root")
ControlTreeView ($gui, "", $h_tree, "Select", "卖出")
Opt("MouseCoordMode", 2)
MouseMove ( 30, 710 )
MouseClick("left") ;点“卖出”
ControlFocus($winname,"","Edit5")
sleep(200)
Send('600143')
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-16 06:28 , Processed in 0.083800 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表