Sign in to follow this  
Followers 0
speedi

to wait until window is finished

8 posts in this topic

I have searched and haven't found a solution.

I want my script to wait until a window is finished loading.

Script:

If WinExists("PowerDesk ->") Then

Else

Run("C:\Program Files\PowerDesk\Pdexplo.exe", "", @SW_MAXIMIZE)

EndIf

Here is where I want the script to wait until this enhanced windows explorer "pdexplo.exe" is finished displaying all the files the folder contains.

I have tried winwaitactive and the script continues as soon as the titlebar shows "PowerDesk ->"

I have tried winwaitnotactive and the script never continues.

Help would be greatly appreciated...

Share this post


Link to post
Share on other sites



You can possibly use the status bar? Use ControlGetText()

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You can possibly use the status bar? Use ControlGetText()

Thanks! I looked at that command, but could not determine how I could use it...

Edited by speedi

Share this post


Link to post
Share on other sites

Ok look at the status bar immediately after opening the program. Then see what's different about it once everything has loaded completely. I don't have that program so I couldn't tell you... ControlGetText() will let you read the text from the status bar, you need the WindowInfoTool to give you the ClassName or ControlID of those controls to use as one of the parameters of ControlGetText(). Is this program free so I can download and try to help you out?

Share this post


Link to post
Share on other sites

Ok look at the status bar immediately after opening the program. Then see what's different about it once everything has loaded completely. I don't have that program so I couldn't tell you... ControlGetText() will let you read the text from the status bar, you need the WindowInfoTool to give you the ClassName or ControlID of those controls to use as one of the parameters of ControlGetText(). Is this program free so I can download and try to help you out?

Unfortunatley the program is not free...

If I use the autoit windows info for this programs window, I see this... (attachment)

post-97-1244222094_thumb.jpg

The drive letter "C:" would always be the same, but the other info - files, bytes etc. would be different....

Share this post


Link to post
Share on other sites

You're going to have to get a little creative I think. I made a mistake, you want StatusBarGetText(), not ControlGetText.

Share this post


Link to post
Share on other sites

You're going to have to get a little creative I think. I made a mistake, you want StatusBarGetText(), not ControlGetText.

I think I have it now... I am testing at the moment.. I'll post the result ina few minutes... Thanks!

Share this post


Link to post
Share on other sites

I think I have it now... I am testing at the moment.. I'll post the result ina few minutes... Thanks!

Thanks for your help... This works:

If WinExists("PowerDesk ->") Then

Else

Run("C:\Program Files\PowerDesk\Pdexplo.exe", "", @SW_MAXIMIZE)

EndIf

winwaitactive("PowerDesk ->")

$x = "XX"

while $x <> "C:"

$x = StringLeft ( StatusbarGetText("PowerDesk ->"), 2 )

wend

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