Jump to content
Sign in to follow this  
Clay

issues with WinWaitActive

Recommended Posts

Clay

I am encountering some issues when using WinWaitActive, if anyone knows what I am doing wrong or know's why it is not working for me please do share.

So this is a snippet of my code

$window, .... the Header in the dialog

case 5 
   If Not WinWaitActive($window, "License Agreement", 120) Then 
      write_log($LOG_INFO, $gateway_name & " Install", "Entering the License Agreement dialog....")
      write_log($LOG_INFO, $gateway_name & " ERROR", "License Agreement dialog action failure")
      _Exit("License Agreement", $err_log) 
      $b_loop = false
      ExitLoop
   Else;determine whether this is a msi or legacy install package
      if (ControlCommand($window, "License Agreement", "&Next >", "IsVisible") = 1) Then
      $b_msi = true
      write_log($LOG_INFO, $gateway_name & " Install", "Detected a MSI installation package")
      if (ControlCommand($window, "License Agreement", "Button2", "IsChecked", "") = 0) Then
     write_log($LOG_WARNING, $gateway_name & " Install", "License agreement does not default to not accept the license agreement", $err_log)
   EndIf
  
etc...

even if the the expected window does not show up the script does not execute the desired code in the If Not WinWaitActive block of code, it just completely ignores it...

I also tried writing the result of Winwaitactive to a variable and then tried executing the code in the block if Var = 0 but that didn't work either ...

Any suggestions?

Edited by Clay

Share this post


Link to post
Share on other sites
enaiman

What I can think of is: your $window is not really the handle to your app.

How did you get this variable? What does it represent? a handle? a title?

If it is a title and if it is a long one, you might want to shorten the title and try again.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.