MQL5Book/Scripts/p4/EnvKeys.mq5

22 lines
1 KiB
MQL5
Raw Permalink Normal View History

2025-05-30 16:09:41 +02:00
//+------------------------------------------------------------------+
//| EnvKeys.mq5 |
//| Copyright 2021, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
for(ENUM_TERMINAL_INFO_INTEGER i = TERMINAL_KEYSTATE_TAB;
i <= TERMINAL_KEYSTATE_SCRLOCK; ++i)
{
const string e = EnumToString(i);
// skip values not presenting elements of the enumeration
if(StringFind(e, "ENUM_TERMINAL_INFO_INTEGER") == 0) continue;
PrintFormat("%s=%2X", e, (uchar)TerminalInfoInteger(i));
}
}
//+------------------------------------------------------------------+