以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://www.weistock.com/bbs/list.asp?boardid=2)
----  金字塔实现自动通达信交易  (http://www.weistock.com/bbs/dispbbs.asp?boardid=2&id=87779)

--  作者:fengxiaoyong
--  发布时间:2015/11/26 23:41:52
--  金字塔实现自动通达信交易

 我用autoit3实现VBA操作通达信自动交易,

Sub Test1()


Dim oShell
Dim oAutoIt


\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'
\' Initialise Variables & Objects
\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'

Set oAutoIt = createobject("AutoItX3.Control")


\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'
\' Start of Script
\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'\'
Call oAutoIt.ToolTip("hi★★欢迎使用我的软件★★★★")

call oAutoIt.Run("notepad.exe")

\' Wait for the Notepad window to become active
oAutoIt.WinWaitActive "Untitled - Notepad", ""

\' Send some keystokes to notepad
oAutoIt.Send "Hello, this is line 1{ENTER}"
oAutoIt.Send "This is line 2{ENTER}This is line 3"
oAutoIt.Sleep 1000
oAutoIt.Send "!{F4}"
oAutoIt.WinWaitActive "Notepad", "save the changes?"
oAutoIt.Send "!n"
oAutoIt.WinWaitClose "Untitled - Notepad", ""

Set oAutoIt=nothing
End Sub

但是用了这个代码,金字塔就卡死了,对应的OCX已经regsvr32,难道金字塔调用外部的DLL,有限制?EXCEL的VBA调用都正常


--  作者:王锋
--  发布时间:2015/11/27 8:28:38
--  

使用Application.msgout函数调试一下看一下是在那一行卡死的?

另外目前金字塔已经自己在研发外挂系统了,预计下个月中旬左右就会推出来。


--  作者:fengxiaoyong
--  发布时间:2015/11/27 9:07:56
--  

 

我调试了一下,知道原因了,通过AUTOIT可以实现任何第三方的股票软件的自动化交易,金字塔的VBA很棒


--  作者:yzhybw
--  发布时间:2015/11/27 10:13:32
--  

如何用你的通达信自动交易?


--  作者:十世
--  发布时间:2015/11/27 10:20:40
--  
请不要在官方论坛 讨论其他的软件  如果有需要 请私下联系  谢谢