elmutt Posted August 25, 2012 Share Posted August 25, 2012 Im trying to write a script to automate some things in tradestation 9.1 and it seems any kind of automated input simply does not work with tradestation. I tried autohotkey and it does not work either. I assume this is because there are some built in countermeasures in tradestation to prevent automated input. Im curious if anyone has run into this problem with tradestation or any other programs and if there is any way around it? I was thinking of just writing what I need in c++ but I have a feeling it still might not work. Any ideas? Thanks for any help Link to comment Share on other sites More sharing options...
water Posted August 25, 2012 Share Posted August 25, 2012 (edited) What does the AutoIt Window Info Tool display for the controls you try to automate? What have you tried so far? Can you post the code? Edited August 25, 2012 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
elmutt Posted August 25, 2012 Author Share Posted August 25, 2012 Im just trying a very basic script before I do anything major. Ultimately I want to do some automated data downloading but right now im just trying to make anything work: WinWaitActive("TradeStation 9.1 - Desktop #1 - StockResearch1") Send("This is a test") MsgBox(0, "Tutorial", "Hello World!") The message box comes up but the text does not get entered. When used on notepad the text gets entered fine. Exact same deal with autohotkey, I can get it to beep when the script is run but mouse clicks and keyboard input do nothing at all. Link to comment Share on other sites More sharing options...
water Posted August 25, 2012 Share Posted August 25, 2012 I would give ControlSend a try because Send is not very reliable for what you try to do. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
elmutt Posted August 25, 2012 Author Share Posted August 25, 2012 (edited) I tried ControlSend("TradeStation 9.1 - Desktop #1 - StockResearch1", "", "[CLASSNN:Edit47]", "test string") and it does nothing in tradestation. Also the mouse clicks work if im doing it for notepad but does nothing for tradestation. MouseClick("left", 1220, 298, 2) - Works in notepad but does nothing if tradestation is the active window Edited August 25, 2012 by elmutt Link to comment Share on other sites More sharing options...
water Posted August 25, 2012 Share Posted August 25, 2012 What's the return value of ControlSend? $iResult = ControlSend("TradeStation 9.1 - Desktop #1 - StockResearch1", "", "[CLASSNN:Edit47]", "test string") MsgBox(0, "", "Result: " & $iResult) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 27, 2012 Moderators Share Posted August 27, 2012 Is this an actual desktop app, or are you trying to enter data into the website itself? From the website (albeit without creating an account) it appears it is all web based, which if it is Java may make it very difficult to interact with. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
peterp Posted August 27, 2012 Share Posted August 27, 2012 elmutt,Depending on what you're trying to do, it may be simpler to use TradeStation's EasyLanguage. I'd be happy to give you a hand with that.peter@tradestation.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