Sign in to follow this  
Followers 0
Guest DaleS

Basic getting started question

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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}")

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Thank you for your reply. I will try your suggestion.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0