Memnoch Posted June 3, 2008 Share Posted June 3, 2008 (edited) Any idea why this works: $win = WinGetPos ( "[Active]" ) and this doesn't: $win = WinGetPos ( "Untitled - Notepad" ) Even tried portions of the name, as in "Un" and it still won't find the window. The first one works, you just have to make sure that the window you want to read from is made active first. I've looked through the description of the command and haven't spotted anything that might indicate I am doing something wrong but then that's me all over. Edited June 3, 2008 by Memnoch Link to comment Share on other sites More sharing options...
Briegel Posted June 3, 2008 Share Posted June 3, 2008 Any idea why this works: $win = WinGetPos ( "[Active]" ) and this doesn't: $win = WinGetPos ( "Untitled - Notepad" ) Even tried portions of the name, as in "Un" and it still won't find the window. The first one works, you just have to make sure that the window you want to read from is made active first. I've looked through the description of the command and haven't spotted anything that might indicate I am doing something wrong but then that's me all over. Works this? Opt("WinTitleMatchMode", 2) $win = WinGetPos ( "Notepad" ) Link to comment Share on other sites More sharing options...
Memnoch Posted June 3, 2008 Author Share Posted June 3, 2008 (edited) Sorry! It was me. The script was running through so fast that Notepad, at that point, was not even open. Putting in a simple WinWaitActive, or indeed a WinExists loop, fixed it. Thanks for your reply anyway. I knew I was missing something as I've never had problems with that before. Edited June 3, 2008 by Memnoch 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