Sending key stroke from MC. Is it possible

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Sending key stroke from MC. Is it possible

Postby arjfca » 23 Mar 2012

Hello

I would like to send Key stroke "CTRL S" to send a command that will save my worspace at a regular interval. It it possible

This morning, my PC froze and I lost all the commentary that I had placed over my charts. Not fun as it was the first time that I had decided to really took the time to indicate my entry and exit :(

Any help appreciated

Martin

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Sending key stroke from MC. Is it possible

Postby TJ » 23 Mar 2012

Hello

I would like to send Key stroke "CTRL S" to send a command that will save my worspace at a regular interval. It it possible

This morning, my PC froze and I lost all the commentary that I had placed over my charts. Not fun as it was the first time that I had decided to really took the time to indicate my entry and exit :(

Any help appreciated

Martin
You can get a 3rd party macro program. Google for free downloads.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Sending key stroke from MC. Is it possible

Postby arjfca » 23 Mar 2012

Hello

I would like to send Key stroke "CTRL S" to send a command that will save my worspace at a regular interval. It it possible

This morning, my PC froze and I lost all the commentary that I had placed over my charts. Not fun as it was the first time that I had decided to really took the time to indicate my entry and exit :(

Any help appreciated

Martin
You can get a 3rd party macro program. Google for free downloads.
I got AutoHotkey software that I had used in conjunction with Excel to send special hotkey macro
Is it possible to start an EXE application from MC. If this could be done, then the AutoHotkey could be use

Multicharts has already some macro available with the "CTRL S". What I want is to have the code sending the macro command HotKey to actually save my workspace at a regular interval.

Martin

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Sending key stroke from MC. Is it possible

Postby JoshM » 23 Mar 2012

Is it possible to start an EXE application from MC. If this could be done, then the AutoHotkey could be use

Multicharts has already some macro available with the "CTRL S". What I want is to have the code sending the macro command HotKey to actually save my workspace at a regular interval.
If you plan on using AutoHotKey, you can also make an .exe with AutoHotKey, and in pseudo code, you could try something like:

Code: Select all

#IfWinActive, MultiCharts
{
while
{
Send, ^s ; ctrl - s
Sleep, 30000 ; 30 seconds
}
}

; Exit the program with Crtl-Esc
^esc:: ExitApp
(PS: I'm a AHK newbie, so don't trust my word for it. ;) )

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Sending key stroke from MC. Is it possible

Postby arjfca » 23 Mar 2012

Is it possible to start an EXE application from MC. If this could be done, then the AutoHotkey could be use

Multicharts has already some macro available with the "CTRL S". What I want is to have the code sending the macro command HotKey to actually save my workspace at a regular interval.
If you plan on using AutoHotKey, you can also make an .exe with AutoHotKey, and in pseudo code, you could try something like:

Code: Select all

#IfWinActive, MultiCharts
{
while
{
Send, ^s ; ctrl - s
Sleep, 30000 ; 30 seconds
}
}

; Exit the program with Crtl-Esc
^esc:: ExitApp
(PS: I'm a AHK newbie, so don't trust my word for it. ;) )
John, a salutation from Montreal

Thanks,

Even If I had coded with AutoHotkey few years ago, I'm still a newbie. I understand that I could compile the code in a .exe file, I had done that before, hence my question was, could I send a command line via Multicharts

Multichart send a command to execute a file to "c:\mycodefile\SaveMyMultichartsWorkSpace.exe"

SaveMyMultiChartsWorkSpace.exe is an autohotkey application compiled in EXE containing a "CTRL S" key stroke to the applicable workspace

Have a good day

Martin

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Sending key stroke from MC. Is it possible

Postby JoshM » 23 Mar 2012

hence my question was, could I send a command line via Multicharts

Multichart send a command to execute a file to "c:\mycodefile\SaveMyMultichartsWorkSpace.exe"
Ah I overlooked that question, but I don't know that, sorry Martin :). Would be very great if it could be possible though, given the possibilites it opens.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Sending key stroke from MC. Is it possible

Postby arjfca » 23 Mar 2012

hence my question was, could I send a command line via Multicharts

Multichart send a command to execute a file to "c:\mycodefile\SaveMyMultichartsWorkSpace.exe"
Ah I overlooked that question, but I don't know that, sorry Martin :). Would be very great if it could be possible though, given the possibilites it opens.
John, I did send a mail directly to MC support to inquire about this

- Send a keystroke from MC
- Get control or start an external application (.exe) from MC

If problem resolve, I will post the solution under this one

Have a great and relaxing weekend

Martin

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Sending key stroke from MC. Is it possible

Postby Henry MultiСharts » 23 Mar 2012

hence my question was, could I send a command line via Multicharts

Multichart send a command to execute a file to "c:\mycodefile\SaveMyMultichartsWorkSpace.exe"
Ah I overlooked that question, but I don't know that, sorry Martin :). Would be very great if it could be possible though, given the possibilites it opens.
John, I did send a mail directly to MC support to inquire about this

- Send a keystroke from MC
- Get control or start an external application (.exe) from MC

If problem resolve, I will post the solution under this one

Have a great and relaxing weekend

Martin
Hello Martin,

Unfortunately there is no prebuilt functionality to send keystrokes from the code or to get access to a command line.
I believe you can achieve your goal with the help of an external Dll.


Return to “MultiCharts”