Jump to content

Progresson Conflicts With Winwaitactive


Recommended Posts

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Developers

-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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

-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.

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...