Jump to content

Handle to ProgressOn ?


jennico
 Share

Recommended Posts

: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

 

Link to comment
Share on other sites

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

 

Link to comment
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

 

Link to comment
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)
;
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...