marcianopro Posted October 11, 2008 Share Posted October 11, 2008 Hi, I am writing a script in Amibroker to do automated stock trading . Amibroker supports only vbscript and Jscript. I have written a script in Autoit to automatically login the trading web page and place Orders. However This Autoit script uses UDFs. I am using the AutoitX3.Control in vbscript to use the Autoit script. But my problem is that with AutoitX3, The UDFs are not working. Is there any way I can use autoit in vbscript and also use autoit UDFs. Needless to mention I am new to autoit as well as vbscript, but thanks to the excellent forum help, I am able to work with autoit. Marcianopro Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 12, 2008 Share Posted October 12, 2008 You'll have to translate the UDFs to your new language. UDF sources are in your "include" folder. Link to comment Share on other sites More sharing options...
i542 Posted October 12, 2008 Share Posted October 12, 2008 You could try compiling each UDF as an standalone executable and using arguments to call them I can do signature me. Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 13, 2008 Share Posted October 13, 2008 Ivan, how is that supposed to work when using things like web page interactions? That's usually through some COM object and COM objects can't be sent through command line parameters. Not to mention, you can't get return values from functions. Link to comment Share on other sites More sharing options...
i542 Posted October 13, 2008 Share Posted October 13, 2008 Ivan, how is that supposed to work when using things like web page interactions? That's usually through some COM object and COM objects can't be sent through command line parameters. Not to mention, you can't get return values from functions.*coughs* Ok, let's try with this. Try to declare your functions using VB where they will use AutoIt3X Like Function HelloWorld() Set oAutoIt = WScript.CreateObject("AutoItX3.Control") oAutoIt.ToolTip("This is a tooltip", 0, 0) oAutoIt.Sleep(2000) oAutoIt = Nothing End Function I can do signature me. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 13, 2008 Moderators Share Posted October 13, 2008 *coughs* Ok, let's try with this. Try to declare your functions using VB where they will use AutoIt3X Like Function HelloWorld() Set oAutoIt = WScript.CreateObject("AutoItX3.Control") oAutoIt.ToolTip("This is a tooltip", 0, 0) oAutoIt.Sleep(2000) oAutoIt = Nothing End Function*coughs*? You should be... you missed the entire point of the OP ... UDF = "User Defined Function". @OP, The only other option you'd have other than what Richard proposed with translating them to your other language is a 2 executable communication technique. Having autoit exe communicate with your other language exe by means of maybe tcp/reading and writing to files or registry/gui communication etc... I know that martin and I believe others have examples in the example script forum on how they do this in autoit... maybe you can apply these means to both languages to suit your needs if you don't feel like writing the autoit UDFs in this other language. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Girish Posted January 26, 2009 Share Posted January 26, 2009 Hi,I am writing a script in Amibroker to do automated stock trading . Amibroker supports only vbscript and Jscript. I have written a script in Autoit to automatically login the trading web page and place Orders. However This Autoit script uses UDFs.I am using the AutoitX3.Control in vbscript to use the Autoit script. But my problem is that with AutoitX3, The UDFs are not working.Is there any way I can use autoit in vbscript and also use autoit UDFs.Needless to mention I am new to autoit as well as vbscript, but thanks to the excellent forum help, I am able to work with autoit.MarcianoproHere is my blog with good practicle samples of AutoIt script. But I have mostly developed using INI file or SQLITE as my datasource.http://technologyyogi.blogspot.com/I have developed one script for automated trading as well - take a lookLet me know if you need further help. I have interest in developing script for automated trading. ------------------------------SQL DBA - AutoIt hobbyisthttp://gvphubli.blogspot.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now