Jump to content



Photo

WaitButton


  • Please log in to reply
1 reply to this topic

#1 A. Percy

A. Percy

    VW Sedan user

  • Active Members
  • PipPipPipPipPipPip
  • 561 posts

Posted 23 August 2007 - 06:04 PM

In some installers, I need wait a button to appear, so I had coded this:

Func WaitButton( $Window, $ButtonText, $ButtonClass, $TimeOut = 0 )     If WinExists( $Window ) Then         Local $ButtonHandle = 0         Local $InitTimer = TimerInit( )         While 1             $ButtonHandle = ControlGetHandle( $Window, $ButtonText, $ButtonClass )             If @error <> 1 Then ExitLoop             If $TimeOut Then                 If TimerDiff( $InitTimer ) >= ( $TimeOut * 1000 ) Then ExitLoop             EndIf             Sleep( 100 )         Wend     EndIf EndFunc


So, can this "command" be added by default in autoit?
Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

Posted Image VW Bug userPosted Image

Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral







#2 ValeryVal

ValeryVal

    Dig the way

  • Active Members
  • PipPipPipPipPipPip
  • 422 posts

Posted 24 August 2007 - 05:36 AM

You can use A

AdlibEnable("MyDearButton") ;... Exit Func MyDearButton()    $ButtonHandle = ControlGetHandle( $Window, $ButtonText, $ButtonClass )    If @error <> 1 Then      return    else      <MyDearButton handler here>    endif EndFunc

The point of world view




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users