Screenshots - DLL?

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
damnpenguins
Posts: 15
Joined: 19 Oct 2013
Has thanked: 2 times
Been thanked: 7 times

Screenshots - DLL?

Postby damnpenguins » 13 Oct 2015

Sorry everyone for this simple request. I have done a search on the forum and looked in the indicator forum up until p20 or so.

I am wanting to automatically take a screenshot of the workspace on trade entry and exit.

When I searched the main forum I kept getting hits on requests to upload screenshots rather than generating screenshots which is what I am after.

I currently have to go back at the end of the day to take screenshots of my trades, and thought it would be easier to do so via an indicator/signal in real time.

I can't see any native calls to generate screenshots, aside from a manual selection in the file menu, so would I need to create a dll etc to take care of it?

Has anyone come up with a solution for this before?

User avatar
Henry MultiСharts
Posts: 8516
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2735 times

Re: Screenshots - DLL?

Postby Henry MultiСharts » 19 Oct 2015

damnpenguins wrote:I can't see any native calls to generate screenshots, aside from a manual selection in the file menu, so would I need to create a dll etc to take care of it?
Hello damnpenguins,

That is correct. That is no native solution for that. You need to create your own one.

damnpenguins
Posts: 15
Joined: 19 Oct 2013
Has thanked: 2 times
Been thanked: 7 times

Re: Screenshots - DLL?

Postby damnpenguins » 17 Dec 2015

I was just going through the forum and saw this old question of mine.

Just on the off chance that anyone else needs something like this. I was able to get autohotkey to take screenshots via IrfanView every time I initiate an order and save the image to a directory. Here is the code:

autohotkey order shortcuts file:

Code: Select all


#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


;================================
; KEY ShortCuts for Multicharts
;================================
;
;   Shift + LButton for Buy @ mkt
;   Alt + LButton for Sell @ mkt
;   CTRL + Shift + LButton for Limit Buy @ mkt + 4T
;   CTRL + Alt + LButton for Limit Sell @ mkt - 4T
;   CTRL + C Close the trade
;
+LBUTTON::
   SendInput,!{PGUP} ;Multicharts Keyboard Shortcut for @[MKT]Long
   caption= [MKT]Long
        sshot(2,caption)
return


autohotkey function:

Code: Select all

sshot(m,caption)

Modus := m-1 
Destination:="Trades"
IfNotExist, %Destination%       ; if there is not already a destination folder create one
FileCreateDir, %Destination%

FormatTime, fTime,, ddMMM_Hmmss
 
ivParams = /capture= %Modus%   /convert=%SetWorkingDir%\Trades\$U(%fTime%)_%caption%.png 
Runwait, "C:\Program Files\IrfanView\i_view64.exe" "%ivParams%"
;run,%Destination%\capture_%dateTime%.jpg   ;open picture
;run,%SetWorkingDir%\Trades                          ;open folder
Return
}


Return to “User Contributed Studies and Indicator Library”