Jump to content
Sign in to follow this  
BigDaddyO

Progresson Conflicts With Winwaitactive

Recommended Posts

BigDaddyO

I Had a script running great and then I decieded it would be even better if I add a progress bar.

Well, The problem is. I have about 30 WinWaitActive statements in this script and with the Progress window open they no longer work and time out.

Any ideas how to have the sript ignore the progress window? I would really hate to have to rewrite the script because of the status bar.

Thanks


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites
emmanuel

damned spotty wireless, I'd written something then hit post and it bleeped.

why not do winwait then winactivate before each winwaitactive?

(edit: changed it to what I meant to say)

Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites
pekster

How about using the WinExists() function? Something like

$timeout_seconds = 30
$elapsed_seconds = 0
While 1
  Sleep(1000)
  $elapsed_seconds = $elapsed_seconds + 1
  If WinExists("My window title") Then ExitLoop;we have a valid window
  If $timeout_seconds >= $timeout_seconds Then;the timeout was reached
   ;code to handle a "window failed to open" case goes here
  EndIf
WEnd

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites
Jos

-or- WinWait in stead of WinWaitActive..

WinWait waits untill the windows exists where WinWaitActive waits till the windos exists and has the focus...


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
scriptkitty

I really like tooltip, and so I use that a ton. It stays on top, and doesn't ever steal focus.

Example of tooltip progressbar.

tooltip("Loading...please wait",0,0)
$x=1

For $i=1 To 10
tip()
MsgBox(1,"hi","",2)
$x=$x+9
Next

func tip()
tooltip($x&"% done",0,0)
endfunc

Anyway just a thought.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites
pekster

-or- WinWait  in stead of WinWaitActive..

Whopsie. Looks like I just redefined that function :D . Oh well

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites
BigDaddyO

I think I just figured it out... I put a ,1 at the end to remove the border. it's not as nice looking now but it appears to function better.

Thanks for all the suggestions

Mike


hmm... I guess I have to have a signature...

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  

×