飞狐软件交易小脚本代码(供参考)
-
相关简介:飞狐软件交易小脚本代码(供参考) 初学脚本技术,资源来自网络,请老师们别拍砖,谢谢! 不合适的,请各位老师帮俺改改,先谢过了! C/C++ Code 复制内容到剪贴板 #Region #EndRegion #includeButtonConstants.au3 #includeEditConstants.au3 #includeGUIConstantsEx.au3 #includeWindowsConstants.au3
-
文章来源:股海网作者:股海网发布时间:2013-03-02浏览次数:
飞狐软件交易小脚本代码(供参考)
初学脚本技术,资源来自网络,请老师们别拍砖,谢谢!
不合适的,请各位老师帮俺改改,先谢过了!
C/C++ Code复制内容到剪贴板
- #Region
- #EndRegion
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <WindowsConstants.au3>
- Opt("GUIOnEventMode", 1)
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("联", 40, 80, 292, 224, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
- GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
- $Button1 = GUICtrlCreateButton("联动", 2, 2, 36, 18, $WS_GROUP)
- GUICtrlSetOnEvent(-1, "Button1Click")
- GUICtrlSetColor(-1, 0xFFFFF)
- GUICtrlSetBkColor(-1, 0x000000)
- $Button2 = GUICtrlCreateButton("闪买", 2,22, 36, 18, $WS_GROUP)
- GUICtrlSetOnEvent(-1, "Button2Click")
- GUICtrlSetColor(-1, 0xFFFFF)
- GUICtrlSetBkColor(-1, 0xFF0000)
- $Button3 = GUICtrlCreateButton("闪卖", 2,42, 36, 18, $WS_GROUP)
- GUICtrlSetOnEvent(-1, "Button3Click")
- GUICtrlSetColor(-1, 0xF00FF)
- GUICtrlSetBkColor(-1, 0x00FF00)
- $Button4 = GUICtrlCreateButton("撤单", 2,62, 36, 18, $WS_GROUP)
- GUICtrlSetOnEvent(-1, "Button4Click")
- GUICtrlSetColor(-1, 0xFFFFF)
- GUICtrlSetBkColor(-1, 0x0000FF)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ##
- Global $sss
- While 1
- $BT=ControlGetText ("阳光股道 - ", "", 65281 )
- $sss=StringRegExp($BT,'\d{6}',1)
- Sleep(50)
- WEnd
- Func Button1Click()
- If WinExists("[CLASS:TdxW_MainFrame_Class]") Then
- WinActivate("[CLASS:TdxW_MainFrame_Class]")
- Send($sss[0])
- Sleep(100)
- Send("{ENTER}")
- Else
- MsgBox(0, "", "通达信没打开")
- EndIf
- EndFunc
- Func Button2Click()
- If WinExists("[CLASS:TdxW_MainFrame_Class]") Then
- WinActivate("[CLASS:TdxW_MainFrame_Class]")
- Send($sss[0])
- Sleep(100)
- Send("{ENTER}")
- Send("21")
- Sleep(100)
- Send("{ENTER}")
- Else
- MsgBox(0, "", "通达信没打开")
- EndIf
- EndFunc
- Func Button3Click()
- If WinExists("[CLASS:TdxW_MainFrame_Class]") Then
- WinActivate("[CLASS:TdxW_MainFrame_Class]")
- Send($sss[0])
- Sleep(100)
- Send("{ENTER}")
- Send("23")
- Sleep(100)
- Send("{ENTER}")
- Else
- MsgBox(0, "", "通达信没打开")
- EndIf
- EndFunc
- Func Button4Click()
- If WinExists("[CLASS:TdxW_MainFrame_Class]") Then
- WinActivate("[CLASS:TdxW_MainFrame_Class]")
- Send($sss[0])
- Sleep(100)
- Send("{ENTER}")
- Send("22")
- Sleep(100)
- Send("{ENTER}")
- Else
- MsgBox(0, "", "通达信没打开")
- EndIf
- EndFunc
- Func Form1Close()
- exit
- EndFunc
下载资源链接:( 说明:股海资源如需解压密码的请输入本站域名:www.guhai.com.cn 请仔细输入!)
|