飞狐软件交易小脚本代码(供参考)

阅读 作者:股海网时间 2013-03-02 飞狐软件

飞狐软件交易小脚本代码(供参考)

初学脚本技术,资源来自网络,请老师们别拍砖,谢谢!
 不合适的,请各位老师帮俺改改,先谢过了!
 

 飞狐软件交易小脚本代码(供参考)

C/C++ Code复制内容到剪贴板
  1. #Region    
  2. #EndRegion    
  3. #include <ButtonConstants.au3>   
  4.  #include <EditConstants.au3>   
  5.  #include <GUIConstantsEx.au3>   
  6.  #include <WindowsConstants.au3>   
  7.  Opt("GUIOnEventMode", 1)   
  8.  #Region ### START Koda GUI section ### Form=   
  9.  $Form1 = GUICreate("联", 40, 80, 292, 224, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))   
  10.  GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")   
  11.     
  12. $Button1 = GUICtrlCreateButton("联动", 2, 2, 36, 18, $WS_GROUP)   
  13.  GUICtrlSetOnEvent(-1, "Button1Click")   
  14.  GUICtrlSetColor(-1, 0xFFFFF)   
  15.  GUICtrlSetBkColor(-1, 0x000000)   
  16.     
  17. $Button2 = GUICtrlCreateButton("闪买", 2,22, 36, 18, $WS_GROUP)   
  18.  GUICtrlSetOnEvent(-1, "Button2Click")   
  19.  GUICtrlSetColor(-1, 0xFFFFF)   
  20.  GUICtrlSetBkColor(-1, 0xFF0000)   
  21.     
  22. $Button3 = GUICtrlCreateButton("闪卖", 2,42, 36, 18, $WS_GROUP)   
  23.  GUICtrlSetOnEvent(-1, "Button3Click")   
  24.  GUICtrlSetColor(-1, 0xF00FF)   
  25.  GUICtrlSetBkColor(-1, 0x00FF00)   
  26.     
  27. $Button4 = GUICtrlCreateButton("撤单", 2,62, 36, 18, $WS_GROUP)   
  28.  GUICtrlSetOnEvent(-1, "Button4Click")   
  29.  GUICtrlSetColor(-1, 0xFFFFF)   
  30.  GUICtrlSetBkColor(-1, 0x0000FF)   
  31.     
  32. GUISetState(@SW_SHOW)   
  33.  #EndRegion ### END Koda GUI section ##   
  34.  Global $sss   
  35.  While 1   
  36.           $BT=ControlGetText ("阳光股道 - """, 65281 )   
  37.           $sss=StringRegExp($BT,'\d{6}',1)           
  38.           Sleep(50)   
  39.              
  40.  WEnd   
  41.     
  42. Func Button1Click()   
  43.  If WinExists("[CLASS:TdxW_MainFrame_Class]") Then   
  44.           WinActivate("[CLASS:TdxW_MainFrame_Class]")   
  45.           Send($sss[0])   
  46.           Sleep(100)   
  47.           Send("{ENTER}")           
  48.  Else           
  49.            MsgBox(0, """通达信没打开")   
  50.  EndIf   
  51.  EndFunc   
  52.     
  53. Func Button2Click()   
  54.  If WinExists("[CLASS:TdxW_MainFrame_Class]") Then   
  55.           WinActivate("[CLASS:TdxW_MainFrame_Class]")   
  56.           Send($sss[0])   
  57.           Sleep(100)   
  58.           Send("{ENTER}")           
  59.           Send("21")   
  60.           Sleep(100)   
  61.           Send("{ENTER}")    
  62. Else           
  63.            MsgBox(0, """通达信没打开")   
  64.  EndIf   
  65.  EndFunc   
  66.     
  67. Func Button3Click()   
  68.  If WinExists("[CLASS:TdxW_MainFrame_Class]") Then   
  69.           WinActivate("[CLASS:TdxW_MainFrame_Class]")   
  70.           Send($sss[0])   
  71.           Sleep(100)   
  72.           Send("{ENTER}")           
  73.           Send("23")   
  74.           Sleep(100)   
  75.           Send("{ENTER}")    
  76. Else           
  77.            MsgBox(0, """通达信没打开")   
  78.  EndIf   
  79.  EndFunc   
  80.     
  81. Func Button4Click()   
  82.  If WinExists("[CLASS:TdxW_MainFrame_Class]") Then   
  83.           WinActivate("[CLASS:TdxW_MainFrame_Class]")   
  84.           Send($sss[0])   
  85.           Sleep(100)   
  86.           Send("{ENTER}")           
  87.           Send("22")   
  88.           Sleep(100)   
  89.           Send("{ENTER}")    
  90. Else           
  91.            MsgBox(0, """通达信没打开")   
  92.  EndIf   
  93.  EndFunc   
  94.     
  95. Func Form1Close()   
  96.           exit   
  97.  EndFunc   

 

附件下载

本地下载 (免费下载)

上传会员: 
股海网
上传时间: 
2013-03-02
下载积分: 
-
免责申明: 
请仔细阅读并同意后才能下载
本附件为论坛用户分享上传,股海网没有对文件进行验证,不能保证下载资源的准确性、安全性和完整性,也不保证下载资源能正常安装和使用,且下载后扣除的积分无法退还,除非您充分理解并完全接受本声明,否则您无权下载。
本站对提供下载的软件、指标、资料等不拥有任何权利,其版权归该下载资源的合法拥有者所有。本附件仅供学习和研究,不得用于商业或非法用途,如有侵犯您的版权,请参看 《侵权处理流程》《免责声明条款》
点击下载无反应时,更换手机自带浏览器重登录操作,如华为浏览器,苹果Safari浏览器,第三方浏览器有不兼容现象,或先收藏再到电脑端下载
同意以上声明才能下载,扣除积分无法退还!
我已知晓! 点我同意 所有条款自愿下载!
如有问题请点关闭提交问题反馈→
关闭
收藏
全部评论共 0 条

问题反馈 取消