Jump to content

Tricky Automate {ENTER} Window within a window


kpt
 Share

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

Instance:2

basic code I am looking for something like

While true

Sleep(2000)

Send("{ENTER}")

Sleep(4000)

Wend

Link to comment
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 comment
Share on other sites

Thanks Mass.

I have tried this:

While true

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

Sleep(2000)

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

Wend

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 comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...