Jump to content

Tricky Automate {ENTER} Window within a window

Recommended Posts

I'm trying to automate a scan of stocks

I can't seem to get the Enter key to loop in the window I want.

It works fine in notepad but when I switch to my program it does not register.

please help. I am just trying to do a simple Enter key loop for a window within a window.

Here is the window information

Basic Window Info

Title: tradestation 9.0 - Stocks

Class: ORPLAT.EXE Tradestation

Basic Control info

Class: TSGridWndClass


basic code I am looking for something like

While true





Link to post
Share on other sites

I suspect that you need to use WinActivate before sending the Enter key to make sure the window is the active one.

If sending the Enter button doesn't work, you could try using MouseClick on the relative coordiate of the button you need to click.

#include <ByteMe.au3>

Link to post
Share on other sites

Thanks Mass.

I have tried this:

While true

WinWaitActive("[TITLE:TradeStation 9.0 - Stocks - [scanner - G]; CLASS:TSGridWndClass; INSTANCE:2]", "")


ControlSend("{ENTER}") ----- Also tried Send("{ENTER}")


however it still does not register the Enter in the window I want

I thought about the mouse idea but I would have to mouse click the whole screen about 400 times which would be a lot of work to make. Thought a simple Enter key would be suffice if I could just get it to register.

Any tips would be appreciated. thanks!

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...