masterng Posted January 31, 2008 Share Posted January 31, 2008 (edited) I encountered some strange behavior when running the script below:; Script Start - Add your code below here; Run("notepad.exe")dont need this as Notepad will be opened manually before running the script; WinWaitActive("Untitled - Notepad")same as aboveSend("This is some text.")WinMove("Untitled - Notepad", "", 20, 20, 400, 300)Sleep(2000)WinSetState("Untitled - Notepad", "", @SW_MAXIMIZE)Sleep(2000)WinSetState("Untitled - Notepad", "", @SW_RESTORE)sleep(2000)WinMove("Untitled - Notepad", "", 500, 250, 640, 480)Basically if an Untitled Notepad is already created and running in Window mode (not Minimized or Maximized) and I execute this script, everything works fine. But if I maximize the same Notepad and run the script, it skips the Maximizing and Restoring steps and goes to the last Winmove step. Further more, looks like some keys got stuck after I closed the Notepad as I could not double click to open the notepad file again. On the first double click on the Notepad, nothing happened, and on the second double click on the Notepad, I got a Property window open instead of the Notepad...Definitely a newbie question as you can see, and hopefully there is a solution. Hope someone can help... Thanks in advance Edited January 31, 2008 by masterng Link to comment Share on other sites More sharing options...
Achilles Posted January 31, 2008 Share Posted January 31, 2008 Hmm... This might be a bug... After resizing a maximized window it looks like the window doesn't realize it's not full screen any more, which means it doesn't have an icon for maximize and instead has an icon for restore... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
masterng Posted January 31, 2008 Author Share Posted January 31, 2008 Hmm... This might be a bug... After resizing a maximized window it looks like the window doesn't realize it's not full screen any more, which means it doesn't have an icon for maximize and instead has an icon for restore...My first script and already ran into a bug... Any way to work around this? 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