downinflames Posted November 21, 2008 Share Posted November 21, 2008 I am very new to AutoIT and hope I am not requesting assistance on something obvious, but I am trying to develop a tool to capture performance of a in-house application. As I execute certain tasks I capture the response time. Very simple. For this to be repeatable on various monitor sizes and screen resolution I would image that each item that is not a control must be in a specific location. The window is split, thus I need to set the Window to a specific size then the top and bottom panes to specific sizes. I have been looking for a control to allow me to resize the top window, but that didn't appear to work. CODE$sWinHandle = ControlGetHandle("[CLASS:AfxWnd80u; INSTANCE:9]","",1) ControlMove($sWinHandle,"",1,24,54,1166,399) Is my logic incorrect? ... using the wrong tactic? ... syntax wrong? .... all of the above? Any suggestions would be appreciated. Thanks in Advance Link to comment Share on other sites More sharing options...
herewasplato Posted November 21, 2008 Share Posted November 21, 2008 (edited) Welcome to the forum. I hope that your application puts the split screens (panes?) in the same place if the overall window is the same size - if that is the case, then use WinMove() to put the application's windows in the upper left corner of the screen 0,0. With that same WinMove line of code, give the window of interest a width & height that will work on most screen resolutions. If you really want to get fancy, you can read the screen resolution (@DesktopHeight & @DesktopWidth) then adjust all of your code to account for any size. If your app does not standardize "item" locations when the parent window is resized, then you might have to resort to the PixelCheckSum or PixelSearch functions to find each item of interest before you start your testing. Edited November 21, 2008 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
downinflames Posted November 21, 2008 Author Share Posted November 21, 2008 Welcome to the forum.I hope that your application puts the split screens (panes?) in the same place if the overall window is the same size - if that is the case, then use WinMove() to put the application's windows in the upper left corner of the screen 0,0.With that same WinMove line of code, give the window of interest a width & height that will work on most screen resolutions.If you really want to get fancy, you can read the screen resolution (@DesktopHeight & @DesktopWidth) then adjust all of your code to account for any size.If your app does not standardize "item" locations when the parent window is resized, then you might have to resort to the PixelCheckSum or PixelSearch functions to find each item of interest before you start your testing.Thanks for the reply. I should have mentioned that I had already identified WinMove and was able to get that work successfully. As you stated, the top and bottom portion of the window are not set proportionally when the window is resized. Thus it appears that I will have to manually resize the frame. I was hoping to find a control that would allow me to grab the splitter between windows. It sounds like no such control exists? Is your suggestion then to use PixelCheckSum and PixelSearch to identify the location of that bar then use mouse clicks to drag so as to resize the windows? Or did I miss the point?Thanks again. Link to comment Share on other sites More sharing options...
youknowwho4eva Posted November 21, 2008 Share Posted November 21, 2008 you could move the mouse across the screen and stop it when the mouse is the position arrow. Mousegetcursor(13) I believe Giggity Link to comment Share on other sites More sharing options...
downinflames Posted November 21, 2008 Author Share Posted November 21, 2008 you could move the mouse across the screen and stop it when the mouse is the position arrow. Mousegetcursor(13) I believeInteresting. Thanks for the suggestion. I will look into that. Link to comment Share on other sites More sharing options...
herewasplato Posted November 22, 2008 Share Posted November 22, 2008 ... Is your suggestion then to use PixelCheckSum and PixelSearch to identify the location of that bar then use mouse clicks to drag so as to resize the windows? ...That is no longer my suggestion now that I'm awake :-) Make sure that you used ControlGetHandle correctly by checking the value of $sWinHandle Failure: Returns "" (blank string) and sets @error to 1 if no window matches the criteria. If $sWinHandle is a blank string and @error equals 1 then there is no reason to attempt the ControlMove line of code. You might have checked this and not posted that part of your code. ControlGetHandle("title", "text", controlID) ControlGetHandle("[CLASS:AfxWnd80u; INSTANCE:9]","",1) I don't use the Advanced Window Descriptors much so I cannot tell you much there. Did you get AfxWnd80u from the AutoIt Info Tool - window tab: >>>> Window <<<< Title: C:\ Class: ExploreWClass Maybe if you posted all of part of the summary tab from the AutoIt Info Tool for the window of interest - then some of the smarter folks in the forum can help you out :-) youknowwho4eva, MouseGetCursor is much better than the Pixel funcs... for some reason, a simple frame bar was not what came to my mind from the OP. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
graydwarf Posted February 11, 2015 Share Posted February 11, 2015 This is how I solved it. ControlMove ("Untitled - Notepad", "", 1001, 100, 0) ControlClick("Untitled - Notepad", "", 1001) "Untitled - Notepad" is the window that contains the divider control 1001 is the divider ID that I want to "grab" and move to a specific location. 100 is the x offset relative to the application. 0 is the y offset which is required. In the application I'm working with, the slider moves but the application does not trigger a repaint until I click the divider. After I click it, the application refreshes and everything is where I want it. Hope this helps someone down the line. Good luck. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now