Sign in to follow this  
Followers 0
Merchants

press a button 2x in a very short time to activate a func

3 posts in this topic

press a button 2x in a very short time to activate a func

Time 50-100 milliseconds

While 1

   ;some codes that i need

Wend

Func _Button_2x_Pressed()
   Msgbox(64,"Msg","Button 2x Pressed")
Func End

Share this post


Link to post
Share on other sites



press a button 2x in a very short time to activate a func

Time 50-100 milliseconds

While 1

;some codes that i need

Wend

Func _Button_2x_Pressed()
Msgbox(64,"Msg","Button 2x Pressed")
Func End

You can do something similar to what is found below.

Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg
Local $hWndFrom, $iIDFrom, $iCode
$hWndFrom = $ilParam
$iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word
$iCode = BitShift($iwParam, 16) ; Hi Word
Switch $iCode
Case $LBN_DBLCLK ; Sent when the user double-clicks a string in a list box
Switch $hWndFrom
Case $hWndListBox
$fAction = 1
Case $hWndListBox2
$fAction = 2
EndSwitch
EndSwitch
EndFunc

Found in thread:

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

this can be a opties..

While 1
   If _IsPressed("57", $dll) Then
      While 1
         If Not _IsPressed("57", $dll) Then ExitLoop
      WEnd
      $i=50
      While 1
         If _IsPressed("57", $dll) Then
            While 1
               If Not _IsPressed("57", $dll) Then ExitLoop
               ControlSend("[Class:Grand theft auto San Andreas]", "", "","w")
            WEnd
         EndIf
         If $i=0 Then ExitLoop
         $i-=1
         Sleep(1)
      WEnd
   EndIf
   If Not WinExists("[Class:Grand theft auto San Andreas]") Then Exit
   Sleep(10)
WEnd
Edited by Merchants

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