muzle6074 Posted January 4, 2008 Share Posted January 4, 2008 How do you position window after WinWaitActive? for example: WinWaitActive("Untitled - Notepad") now once the notepad appears how can I position it? - muzle6074 Link to comment Share on other sites More sharing options...
chssoccer Posted January 4, 2008 Share Posted January 4, 2008 WinMove() Link to comment Share on other sites More sharing options...
muzle6074 Posted January 4, 2008 Author Share Posted January 4, 2008 Can you please give me an example of the parameters I have to give the command winmove()? I'm very new to this... For example do I just go winmove(0,0) or do I need to full in the other parameters? Link to comment Share on other sites More sharing options...
everseeker Posted January 4, 2008 Share Posted January 4, 2008 How do you position window after WinWaitActive? for example: WinWaitActive("Untitled - Notepad") now once the notepad appears how can I position it? - muzle6074WinMove -------------------------------------------------------------------------------- Moves and/or resizes a window. WinMove ( "title", "text", x, y [, width [, height[, speed]]] ) Parameters title The title of the window to move/resize. See Title special definition. text The text of the window to move/resize. x X coordinate to move to. y Y coordinate to move to. width [optional] New width of the window. height [optional] New height of the window. speed [optional] the speed to move the windows in the range 1 (fastest) to 100 (slowest). If not defined the move is instantaneous. Return Value Success: Returns 1. Failure: Returns 0 if window is not found. Remarks WinMove has no effect on minimized windows, but WinMove works on hidden windows. If the width and height are small (or negative), the window will go no smaller than 112 x 27 pixels. If width and height are large, the window will go no larger than approximately [12+@DesktopWidth] x [12+@DesktopHeight] pixels. Negative values are allowed for the x and y coordinates. In fact, you can move a window off screen; and if the window's program is one that remembers its last window position, the window will appear in the corner (but fully on-screen) the next time you launch the program. If multiple windows match the criteria, the most recently active window is used. If x and y equal to the Default keyword no move occurs, just resizing. When speed is used the move is done with the new size. (This is directly from the online documentation... Try it, You'll like it) Everseeker Link to comment Share on other sites More sharing options...
cppman Posted January 4, 2008 Share Posted January 4, 2008 $szTitle = "Untitled - Notepad" Run("Notepad.exe") WinWaitActive($szTitle) WinMove($szTitle, "", 0, 0, 640, 480) Miva OS Project Link to comment Share on other sites More sharing options...
Kryptonite Posted January 4, 2008 Share Posted January 4, 2008 (edited) WinMove("Name of Window", "", 0, 0) #cs Change name of window to... the name of the window The second parameter isn't necessary in most cases First 0 is the X position Second 0 is the Y position #ce EDIT: Chris95219 beat me Edited January 4, 2008 by Kryptonite 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