MQL get text data from logon field

 

Hi all,

Can I get text data like account and server from login window fields over MQL or winuser functions?

Thanks.

 
Alexander Melnikov: Hi all, Can I get text data like account and server from login window fields over MQL or winuser functions? Thanks.

You don't need to copy from the fields. The information is available via MQL functions:

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Account Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Fernando Carreiro #:

You don't need to copy from the fields. The information is available via MQL functions:

You are right but it's available only after login, I wanted to check which server I'm going to connect to and choose then set the appropriate account and password.
 
Alexander Melnikov #You are right but it's available only after login, I wanted to check which server I'm going to connect to and choose then set the appropriate account and password.

You can't do that with MQL, and even with DLL calls to the WinAPI it will still be difficult to accomplish.

Reason: