Search the Community
Showing results for tags 'ninjatrader'.
-
I have a script that takes screenshots of the ninjatrader charting window. I have 2 issues that i need an idea for solution. 1. i need to scroll the window fully to right? the title of the window =$EURUSD and the class of the scrollbar =WindowsForms10.SCROLLBAR.app.0.378734a i am already having the handle of the window using $hWnd = WinGetHandle($Title5) how can i click the scrollbar all the way to right?Fixed 2. sometimes the chart scaling is invalid and so there will be a icon F that i have highlighted with arrow on the image. its in the top right hand corder of this window. All i have to do is to click on it to restore the scaling. How can i find that point and automate the click? #include <ScreenCapture.au3> Example() Func Example() Local $hWnd Local $Title5 ="$EURUSD" Local $FilePath="c:\temp\images" Local $FileName="Filename" Opt("WinTitleMatchMode", 2) if($CmdLine[0]>0) Then ; Contains the total number of items in the array. $FileName=$CmdLine[1] EndIf If WinExists($Title5) Then ; MsgBox($MB_SYSTEMMODAL, "", $CmdLine[0]) ; Retrieve the handle of the Notepad window using the classname of Notepad. $hWnd = WinGetHandle($Title5) ; Activate the Notepad window using the handle returned by WinWait. WinActivate($hWnd) ;scroll to the right EndFunc ; click on focus icon ; Capture window _ScreenCapture_CaptureWnd( $FilePath & $FileName & $Title5 &".jpg", $hWnd) Else MsgBox($MB_SYSTEMMODAL, "", "Window does not exist") EndIf #CS If WinExists($Title1) Then ### ; MsgBox($MB_SYSTEMMODAL, "", $CmdLine[0]) ### ; Retrieve the handle of the Notepad window using the classname of Notepad. ### $hWnd = WinGetHandle($Title1) ### ; Activate the Notepad window using the handle returned by WinWait. ### WinActivate($hWnd) ### ### ; Capture window ### _ScreenCapture_CaptureWnd( $FilePath & $FileName & $Title1 &".jpg", $hWnd) ### ### Else ### MsgBox($MB_SYSTEMMODAL, "", "Window does not exist") ### EndIf #CE ShellExecute($FilePath & $FileName & $Title5 &".jpg") ShellExecute($FilePath & $FileName & $Title1 &".jpg") EndFunc ;==>Example