jennico Posted April 11, 2009 Posted April 11, 2009 need some short help: how to get the handle to the ProgressOn - window ? thx j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
Valuater Posted April 11, 2009 Posted April 11, 2009 766 posts and don't know this? ProgressOn("Progress Meter", "Increments every second", "0 percent") WinWaitActive("") $hwnd = WinGetHandle("Progress Meter", "Increments every second") WinMove($hwnd, "", 100, 100) If IsHWnd($hwnd) Then MsgBox(0x0, "OK", "Hwin = " & $hwnd) 8)
jennico Posted April 12, 2009 Author Posted April 12, 2009 (edited) thx. i'm ashamed, but i could not get it working. the funny issue is: this i tried and not working ! (my excuse) ProgressOn("blabla","gfhjg") WinWaitActive("blabla") MsgBox(0,"",WinGetHandle("blabla")) Do Until GUIGetMsg()=-3 so why not ? j. Edited April 12, 2009 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
jennico Posted April 12, 2009 Author Posted April 12, 2009 well i still can't explain myself why ]WinWaitActive("")oÝ÷ Û +Ì!WºÚ"µÍUÚ[ØZ]XÝ]J ][ÝÔÙÜÜÈY]][ÝÊ fails. can anyone ? j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
jpm Posted April 12, 2009 Posted April 12, 2009 You check an active window but the progress window is not in active state so the wait will wait forever
jennico Posted April 12, 2009 Author Posted April 12, 2009 (edited) i don't understand. valuater uses WinWaitActive(""), which is working. when you say, the progress will never be active, why does WinWaitActive("") work then ? j. edit: it just waits for ANY active window ??? btw: i tried the same with WinWait("") - same result - no active waiting there. Edited April 12, 2009 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
Valuater Posted April 12, 2009 Posted April 12, 2009 Sorry jennico, I understand what you are saying and I didn't know there was a problem with using the title. ... just use what works and move on, I like to understand too, but It's not always possible. 8)
jennico Posted April 12, 2009 Author Posted April 12, 2009 ja, i give it up. yesterday i was very confused, today i don't care anymore. wingethandle needs the title, winwait and winwaitactive do not work with title given. c'est la vie. j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
Valuater Posted April 12, 2009 Posted April 12, 2009 Well, I've always loved this oneFunction WinGetTitleWinGetTitle ( "title" [, "text"] ).... Win get title from the title???8)
Authenticity Posted April 12, 2009 Posted April 12, 2009 lol Valuater. Would WinGetTitle( $hwnd [, "text"] ) satisfy you?
Malkey Posted April 13, 2009 Posted April 13, 2009 ja, i give it up. yesterday i was very confused, today i don't care anymore. wingethandle needs the title, winwait and winwaitactive do not work with title given. c'est la vie. j.Here is my reasoning why your script does not work. Rule #1673 Do not use WinWaitActive("A Window") in a script which does not have a command before it which will cause "A Window" to become active. Unless that "A Window" will become active by other means. As in the help file, WinWaitActive example with Notepad. The following example helped me understand what was happening. ; ProgressOn("blabla", "gfhjg", "0 Secs") ;WinWaitActive("") ; Wait for the active window to be active. ;WinActivate("blabla"); This command ensures, the next command will work. ;WinWaitActive("blabla"); As a stand alone command, waits for something that never happens. ;This proves that a ProgressOn window is not the active window after ProgressOn is created. $ActiveWinTitle = WinGetTitle("") ; Title of active window. $hwnd = WinGetHandle("blabla") ;Uncomment WinMove if Msgbox hidden behind ProgressOn window ;WinMove($hwnd, "", 100, 100) ; Move ProgressOn window to see the Msgbox hidden behind. MsgBox(0, "", "blabla handle : " & $hwnd & @CRLF & _ "Active Win Title : " & $ActiveWinTitle & @CRLF) ;
jpm Posted April 13, 2009 Posted April 13, 2009 You have to understand that title = "" is synomyn of referring to the active window. Obviously there is allways one. Perhaps not the one you want. In the original post "blabla" is not active so you wait forever as opposed to "" which is obviously successfull not refering "blabla" handle but certainly the desktop windows
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