This could easily be modified to respond to any dialog box, but there
is no place to return the message. The code I've written was made to
execute within the TWS program (it's like a benevolent Trojan Horse,)
so we would need a way for it to communicate the dialog text to the
"commanding" program. It should be easy enough to put this together,
but I'm probably not going to add that functionality to my sample.
The technique I've presented has a lot of promise for certain tasks.
For instance, to address an issue recently raised, you could write
some code to pop up a market depth dialog and scrape the values from
it. You could probably do this with a VB program, but given the way
Swing works, it's not guaranteed that you can.
toggle quoted message
Show quoted text
--- In twsapi@y..., "kevin6502" <kevin6502@y...> wrote:
I wonder if this can be modified to find "any" TWS dialog that pops
up, send the "ok", then return the message in the dialog?
--- In twsapi@y..., "alik996" <alik996@y...> wrote:
So, I just uploaded a file called AutoLoginWrapper.java. It is
the
source for a tiny program that registers code to look for the
Login
window opening, starts TWS, finds the Login button, and "presses"
it.
All of this inside the Java VM that is running TWS.