A hack is to send keystrokes to the login window.
Pass your username as separate keystrokes. Then send
a tab key. Then send your password as separate
keystrokes. Then send a return. There is a setting
to pre-fill the username in the .ini file (sorry, no
pre-fill for the password):
[Logon]
Username=edemo
.
.
.
If you pre-filled in the username you can just send a
tab and then the password plus a return key. I send
characters to windows with Perl, but you can do it in
almost any language (Visual Basic, C++).
I believe you can detect when the "Accept incoming
connection" window pops up. If that is possible you
might just be able to send the enter key to it to
accept the connection. I haven't tried this yet.
Good luck,
Carl
--- Michel <migurull@...> wrote:
Hi,
Does somebody know some way to run the TWS
application unattended?
What I need is:
1- Avoid the login screen, passing parameters
(UserName and Password) from
my calling application.
2- Respond to the message window asking 'Accept
incoming connection
attempt?' when I connect to the local server.
This is because I'm writting my own program (Visual
Basic using TWS ActiveX)
which allways runs in the background and want it to
automatically launch TWS
few minutes before markets open and perform some
automated tasks when I'm
not at home.
I've tried to launch TWS from my application with a
call to 'ShellExecute',
passing parameters as 'username' or 'user' without
success. I always get the
login screen blank because I ignore if TWS accepts
such parameters and how
they must be coded (I think this must be possible
because in the web demo,
the login screen appears whith such fields
pre-filled with 'edemo' and
'demouser'). Perhaps in some 'ini' file? (I've not
found any section related
to username and password).
Thanks for any help.
Michel.
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free