
junkone
Members-
Posts
11 -
Joined
-
Last visited
junkone's Achievements

Seeker (1/7)
0
Reputation
-
i fixed the problem with the scroll part. Ninjatrader supports the {END} key so i fixed it by sending the {END} key after window is active. my remaining issue is to find a way to click on that F button. its on the topright of the window with class name Class: WindowsForms10.Window.8.app.0.378734a how can i find the x and y position of the right edge of the control "Class: WindowsForms10.Window.8.app.0.378734a" using Autoit dynamically?
-
Ninjatrader does not offer automation in terms of such levels of scaling. need some ideas to do this.
-
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
-
I did check the images and found they were not the ones i was looking for. then i did the same process again. using the following code twicewinactivate($targetHWND) ;_ScreenCapture_CaptureWnd($BitmapOriginalFile , $targetHWND) _ScreenCapture_CaptureWnd( $BitmapCurrentFile , $targetHWND) I get a true but not sure if it is a perfect match. i get a return code of "True;11;0;0;1160;819;3;11" for $tResult=findBMP($BitmapOriginalFile,$BitmapCurrentFile,False) i have attached both the pictures in teh zip file for you to compare. appreciate your help compare.zip
-
hi. ok. i replaced my images that i was storing to compare and i get a true. however i need to understrand what this return code means. True;10;0;0;112;27;-1;-1 What does each of this parameter in this array mean. appreciate ur help.
-
i do not capture the full screen. i onlyh capture the specific window. obviously there maybe changes if i did fullscreen because of the clock at the bottom of my window. $targetHWND = WinGetHandle("Presentation Server") $begin = TimerInit() winactivate($targetHWND) _ScreenCapture_CaptureWnd($BitmapCurrentFile, $targetHWND) ConsoleWrite("Saving NR window " & TimerDiff($begin) & " milliseconds " & @LF) $WshShell.LogEvent ($INFORMATION, "Saved NR L window ") then i compare it with a copy of the window captured using teh same method previously $tResult=findBMP($BitmapOriginalFile,$BitmapCurrentFile,False) it alwys returns false with the same difference False;1;0;0;808;627;2;22"
-
bingo. gdiplus is not installed on win2k by default. i installed it and it works beautifully. however i havea smaill issue. i used the app to take a screenshot of my app. then i am using the same to take subsequent screenshots to compare and see if it is the same. however this is what i find. $tResult=findBMP($BitmapOriginalFile,$BitmapCurrentFile,False) it always returns "False;1;0;0;808;627;2;22" i would have imagined that it would return true as both the images are supposed to be taken the same way without any change. strange is the way it works.
-
i get error AVector: [] Out of bounds. in C:\Program Files\AutoIt3\Include\GDIPlus.au3 (2688) : ==> Subscript used with non-Array variable.: Return $aResult[0] <> 0 Return $aResult^ ERROR >Exit code: 1 Time: 275.393 I am not sure what this means. appreiate any help. I am running it on windows 2000 prof
-
hello I cannot interact with the windows inside a citrix session. so i want to take a screenshot of the existing window and save it. i would like to compare it with an already saved window to compare and see if they are identical. how can i do it. i have figured auto to the extend to which i can get the window handle of the active citrix session. pl help. Seede Global Const $SUCCESS = 0 Global Const $ERROR =1 Global Const $WARNING =2 Global Const $INFORMATION =4 Global Const $AUDIT_SUCCESS =8 Global Const $AUDIT_FAILURE =16 opt("WinDetectHiddenText",1) opt("WinTitleMatchMode",2) $WshShell = ObjCreate("WScript.Shell") if @error or $WshShell = 0 Then MsgBox(266288,"WshShell","Could not create object.") Exit EndIf $WshShell.LogEvent ($INFORMATION, "Script started.") ; ShellExecute("mynr.lnk","","E:\Documents and Settings\14999\Desktop") if WinWaitActive("Connecting","",5) Then $WshShell.LogEvent ($INFORMATION, "Connecting to NR") EndIf If WinWaitActive("MetaFrame Presentation Server","",10) Then $WshShell.LogEvent ($INFORMATION, "MetaFrame Presentation Server") EndIf Sleep(60*1000) $WshShell.LogEvent ($INFORMATION, "Starting NR L") If WinWaitActive("MetaFrame Presentation Server","",10) Then Send("nrsupport") Send("{TAB}") Send("nrsupport") Send("{TAB}") Send("nrnldb") Send("{ENTER}") Sleep(15*1000) ; take a screenshot of the window ; compare the screenshot with the saved screen ; if they are the same. then its ok ; else log a ERROR IN EVENT LOG $WshShell.LogEvent ($INFORMATION, "Stopping NR L") Send("!f") Send("x") EndIf $WshShell.LogEvent ($SUCCESS, "Script completed." ) $WshShell = 0 Exit
-
how can i launch a icon on desktop. any examples would be appreciated.
-
Need some help with this script. When i simulate hitting enter key. it does not work. Dim $a AutoItSetOption("WinTitleMatchMode", 1) ;works ;WinWaitActive("AmiBroker") ;works $a=WinActivate ( "AmiBroker" ) ;works ControlSetText("AmiBroker", "", "[CLASS:RichEdit20A;]", "YHOO") ;works ControlSend("AmiBroker", "", "[CLASS:RichEdit20A;]", "{ENTER}",0) ;does not work