IB Gateway + SPY++

We are going in circles now. IB Controller is open source. If you want your own C# version of IB Controller, feel free to code it yourself.

IB Controller uses Java specific classes from AWT. In C# no analogue for Java applications.

Actually window messages should to work (and doesn't matter what the technology uses as a background) and window handles should to exist.
 
Actually window messages should to work (and doesn't matter what the technology uses as a background) and window handles should to exist.

Window of IB Gateway doesn't have Children handles I written about it at the first post You can check out it use SPY++ in Visial Studio.
 
nonlinear5, java and C# this is different thing!

I've been a software engineer for the last 20 years, so I know the difference.

I'll try one more time: automation of the TWS/IBGateway login has already been implemented in IB Controller. If you want your own implementation, nothing stops you from coding it yourself.
 
One question: How make the autostart IB Gateway using C# (with or without SPY++)?

Figure out how to start IB Gateway from command line promt:

eg:

java -cp jts.jar:total.2013.jar -Dsun.java2d.noddraw=true -Xmx512M ibgateway.GWClient .

The exact command will depend on which version of the Gateway you are using.

Then supply this exact same command to c# createProcess call (or what ever this method is called in c#)

You can switch the java main class to one that will do an auto login for you eg the IBController entry point.
 
I'll try one more time: automation of the TWS/IBGateway login has already been implemented in IB Controller. If you want your own implementation, nothing stops you from coding it yourself.

nonlinear5, IB Controller this is Java I coding on C# and I can't use technology the IB Controller even if I will be coding it self. Which analog of technology the IB Controller I can use in C#?

If do you know pls tell me!
 
Last edited:
I thought that there is a C# library where can simulate some action user ... "click", "past", "tab" or "enter".
Where is the window we know location coordinates of the window not changing.
 
IBController is a wrapper to launch and log in to IB Gateway. Even if it is in Java it can be spawned like an .exe and therefore can be invoked through a Process via C#. So simply use your C# tool to execute the command line needed to launch IBController. (It's possible to launch Java applications via C# since its nothing more than a java process).

You can then use Visual Studio's Automation library to navigate the pop-up panel (you'll be able to find the window, not sure about the individual controls, but blind tabbing will work).

https://msdn.microsoft.com/en-us/library/ms747327(v=vs.110).aspx


Note, this will not work (I think?) if you have two factor authentication. Haven't seen anything in IBController that can handle that.... which I suppose is good from a security point of view :P
 
Window of IB Gateway doesn't have Children handles I written about it at the first post You can check out it use SPY++ in Visial Studio.

As I understand IB Controller, the Gataway was implemented via Swing. Swing has handles, like a WPF, but it is dynamic. Not sure Spy++ can track it.

Anyway - use SendInput. It should to work.
 
Back
Top