Sign in to follow this  
Followers 0
jennico

Handle to ProgressOn ?

12 posts in this topic

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.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

:D

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 by jennico

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites

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.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites

You check an active window but the progress window is not in active state so the wait will wait forever :D

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by jennico

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Share this post


Link to post
Share on other sites

Well, I've always loved this one

Function WinGetTitle

WinGetTitle ( "title" [, "text"] )

.... Win get title from the title???

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

lol Valuater. Would WinGetTitle( $hwnd [, "text"] ) satisfy you?

Share this post


Link to post
Share on other sites

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)
;

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0