Guest DaleS Posted July 14, 2004 Share Posted July 14, 2004 Hello I have written a script intended to perform several functions in the Tradestation application. I realize that one does not launch AutoIt scripts from within the intended target application - how can I make a script apply to the application? I have begun the script with a WinWaitActive statement (naming the active window) but when executed the result is to create an icon in the system tray, which when right-clicked indicates the script is paused. What are the statement/functions required to make a script work on a chosen application? Was there an example in the documentation that I missed? thank you Dale S Link to comment Share on other sites More sharing options...
Guest DaleS Posted July 15, 2004 Share Posted July 15, 2004 Here's the script referred to in the previous post. ;First line tries to run script when correct window is active WinWaitActive ("Tradestation 8.0") ;Next we select a function on a menu WinMenuSelectItem ("Tradestation 8.0","","Format","Strategies...") ;Click a button ControlClick("Format Analysis Techniques", "", "Button3") ;Wait for the window "Format Strategy" to exist and be active WinWaitActive("Format Strategy") ;Click on the field we want to change MouseClick("left", 151, 138) ;Change the value in the field Send("1") ;Press enter to close all the open dialog boxes Send("{ENTER}") Send("{ENTER}") Send("{ENTER}") Link to comment Share on other sites More sharing options...
Davman Posted July 19, 2004 Share Posted July 19, 2004 What you'll probably find is that when you are right clicking the Auto-It icon, you are seeing the menu option to pause the script. This doesnt mean the script is paused, its an option to make it so. If the script is paused, the icon will flash. AFAIK, the script is indeed waiting for that window name to become active. Make sure that is the EXACT window name. I.E, running Notepad.exe does not result in a window title of "Notepad", it is actually "Untitled - Notepad"... Hope that helps. Sitting comfortably behind the code. Link to comment Share on other sites More sharing options...
Guest DaleS Posted July 19, 2004 Share Posted July 19, 2004 Thank you for your reply. I will try your suggestion. 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