shamsh Posted April 23, 2005 Share Posted April 23, 2005 My first script. I'm attempting to resize a window to my preference. Run ( "notepad.exe") WinActivate("Untitled - Notepad", "") WinMove ( "Untitled - Notepad", "", 2739, 558, 459, 612 ) Sleep (500) Run ( 'C:\Program Files\Mozilla Firefox\firefox.exe' ) But it doesn't seem to be working. After searching through the online doc and forum... i'm completely confused at why it won't work. I'm sure i'm doing something stupid. While i'm at it. Does the WinMove function only work on text files? (questioned due to the requisite for _text_ param in WinMove function). i.e. if i set the following code which loads Windows Picture viewer... and then attempt resize as such: Run ( 'rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen C:\Documents and Settings\someone\My Documents\My Pictures\folder\47.JPG' ) WinActivate("47.JPG - Windows Picture and Fax Viewer", "") WinMove ( "47.JPG - Windows Picture and Fax Viewer", "", 2739, 558, 459, 612 ) Sleep (500) Run ( 'C:\Program Files\Mozilla Firefox\firefox.exe' ) would it work? Thanks Shams Link to comment Share on other sites More sharing options...
Makkhdyn Posted April 23, 2005 Share Posted April 23, 2005 (edited) WinMove ( "Untitled - Notepad", "", 2739, 558, 459, 612 )WinMove ( "title", "text", x, y [, width [, height]] ) Edited April 23, 2005 by Makkhdyn Link to comment Share on other sites More sharing options...
eJan Posted April 23, 2005 Share Posted April 23, 2005 This should work:Run("rundll32.exe shimgvw.dll, ImageView_Fullscreen C:\Documents and Settings\someone\My Documents\My Pictures\folder\47.JPG") WinWaitActive("47.JPG - Windows Picture and Fax Viewer", "") WinMove("47.JPG - Windows Picture and Fax Viewer", "", 2739, 558, 459, 612) Sleep(500) Run('C:\Program Files\Mozilla Firefox\firefox.exe')(You can also use WinSetState instead WinMove). Link to comment Share on other sites More sharing options...
MHz Posted April 23, 2005 Share Posted April 23, 2005 You can also use WinSetState instead WinMove).Are you sure of this? If yes, please show an example. Link to comment Share on other sites More sharing options...
shamsh Posted April 23, 2005 Author Share Posted April 23, 2005 WinMove ( "Untitled - Notepad", "", 2739, 558, 459, 612 )WinMove ( "title", "text", x, y [, width [, height]] ) <{POST_SNAPBACK}>i don't get what you're trying to point out... No WinWait...Run ( "notepad.exe") WinWait(("Untitled - Notepad", "") WinMove ( "Untitled - Notepad", "", 2739, 558, 459, 612 ) Sleep (500) Run ( 'C:\Program Files\Mozilla Firefox\firefox.exe' )<{POST_SNAPBACK}>I'm using WinActivate.... WinWait?@eJan... i will try WinSetState tommorow at work.... thanks (example would be useful as MHz said thanksi'll post my results tommorow (late night for most of u guys ) Link to comment Share on other sites More sharing options...
shamsh Posted April 24, 2005 Author Share Posted April 24, 2005 No WinWait...Run ( "notepad.exe") WinWait(("Untitled - Notepad", "") WinMove ( "Untitled - Notepad", "", 2739, 558, 459, 612 ) Sleep (500) Run ( 'C:\Program Files\Mozilla Firefox\firefox.exe' )<{POST_SNAPBACK}>u da man! thanks guys! 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