kpt Posted January 28, 2012 Share Posted January 28, 2012 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 More sharing options...
sleepydvdr Posted January 28, 2012 Share Posted January 28, 2012 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 More sharing options...
kpt Posted January 29, 2012 Author Share Posted January 29, 2012 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 More sharing options...
kpt Posted January 29, 2012 Author Share Posted January 29, 2012 Oh just to clarify. The scanner list looks like an excel spread sheet Link to comment Share on other sites More sharing options...
kpt Posted January 29, 2012 Author Share Posted January 29, 2012 Nevermind. I got it. Its that darn UAC. I set it to off then restarted. works like a charm. 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