Hello
Intermittent problem:
Once in a while, the typed scale in the command line is interpreted as a new instruments. When this occur, MC will look for a new instrument like "1 Min" instead to modify the scale for Eur.Usd to 1 minute
The typed text is done in the command line box via AutoHotKey ex:
"ALT F4" will type "4 Hours"
"Win F4" will type "5 min"
and it is OK for let say 95% of the time.
Is there something to be done to ensure that there is no mistake between a time scale string and an instrument string
Martin
Command line: Time scale interpreted as a New instrument
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Command line: Time scale interpreted as a New instrument
Hello Martin,
Does it work ok with manual input (without using AutoHotKey) 100% of the time?
Does it work ok with manual input (without using AutoHotKey) 100% of the time?
Re: Command line: Time scale interpreted as a New instrument
I do not use it as much by typing manually directly in the boxHello Martin,
Does it work ok with manual input (without using AutoHotKey) 100% of the time?
Since the problem is occurring one or twice in a day and I do use a lot my 20 hotkeys to play with the scale so difficult to say more
Autohotkey code
I added a 100 ms sleep delay after the enter command. Will see if it help
Code: Select all
#SingleInstance ignore
#F1::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 1 minute {Enter}
sleep, 100
}
return
#F2::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 2 minute {Enter}
sleep, 100
}
return
#F3::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 3 minute {Enter}
sleep, 100
}
return
#F4::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 5 minute {Enter}
sleep, 100
}
return
#F5::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 6 minute {Enter}
sleep, 100
}
return
#F6::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 10 minute {Enter}
sleep, 100
}
return
#F7::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 12 minute {Enter}
sleep, 100
}
return
#F8::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 15 minute {Enter}
sleep, 100
}
return
#F9::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 20 minute {Enter}
sleep, 100
}
return
#F10::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
send 30 minute {Enter}
sleep, 100
}
return
!F1::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 1 Hour {Enter}
sleep, 100
}
return
!F2::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 2 Hour {Enter}
sleep, 100
}
return
!F3::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 3 Hour {Enter}
sleep, 100
}
return
!F4::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 4 Hour {Enter}
sleep, 100
}
return
!F5::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 6 Hour {Enter}
sleep, 100
}
return
!F8::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 8 Hour {Enter}
sleep, 100
}
return
!F9::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 1 day {Enter}
sleep, 100
}
return
!F10::
If WinActive("ahk_class ATL_MCMDIMainFrame")
{
ControlClick, Edit5 ; Click on Scale box
sleep, 100
Send 1 Week {Enter}
sleep, 100
}
return
F11::
FormatTime, xx,, dddd dd MMMMM yyyy ; This is one type of the date format
SendInput, %xx%
sleep, 100
return
F12::
FormatTime, xx,, dddd dd MMMMM yyyy ; This is one type of the date format
FormatTime, zz,, hh:mm:ss tt ; This is one type of the time format
SendInput, %xx% %ZZ%{Enter}
sleep, 100
return
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Command line: Time scale interpreted as a New instrument
Martin, we were unable to replicate this behavior on our end. What we can tell is that command line was designed for manual input, not automated. There are multiple factors that should be taken into attention. That is possible that the window will not have enough time to become active. Therefore we recommend increasing the sleeps and adding sleep before hitting Enter.
Re: Command line: Time scale interpreted as a New instrument
Hello HenryMartin, we were unable to replicate this behavior on our end. What we can tell is that command line was designed for manual input, not automated. There are multiple factors that should be taken into attention. That is possible that the window will not have enough time to become active. Therefore we recommend increasing the sleeps and adding sleep before hitting Enter.
All the best for this Holiday season
I had added a 100 ms after the carriage return. So far, I have not seen the problem
Martin