Jump to content

Mouse up/ Mouse down


Recommended Posts

Below is my current script, I want it to do MouseUp if "Githy" = False

If IsArray(Githy) = True Then
MouseDown("LEFT") ; Set the left mouse button state as down.
EndIf
WEnd
Func _Exit()
Exit
EndFunc

MouseUp("LEFT") ; Set the left mouse button state as up.

Link to comment
Share on other sites

Below is my current script, I want it to do MouseUp if "Githy" = False

If IsArray(Githy) = True Then
MouseDown("LEFT") ; Set the left mouse button state as down.
EndIf
WEnd
Func _Exit()
Exit
EndFunc

MouseUp("LEFT") ; Set the left mouse button state as up.

Link to comment
Share on other sites

Below is my current script, I want it to do MouseUp if "Githy" = False

If IsArray(Githy) = True Then
MouseDown("LEFT") ; Set the left mouse button state as down.
EndIf
WEnd
Func _Exit()
Exit
EndFunc

MouseUp("LEFT") ; Set the left mouse button state as up.

Link to comment
Share on other sites

Hi. Look comments inside script:

If IsArray(Githy) = True Then ; What is Githy? It is no variable because there is no leading $ like $Githy and if it should be a variable it is not declared as anything - so the whole If IsArray Endif is skipped because False
    MouseDown("LEFT") ; is not done because the If above is false
EndIf

WEnd ; There is a Wend but no While - what for? A loop end w/o loop start?

MouseUp("LEFT") ; That is the only function your script does - that seems to make no sense

Func _Exit() ; Functions better stand at the end of your script - but your function never is fired because in the main script there in no _Exit() what would call this function
    Exit
EndFunc

Regards, Conrad

SciTE4AutoIt = 3.7.3.0   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win_10   Build = 19044   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE     H:\...\AutoIt3      H:\...\AutoIt3\Include     (H:\ = Network Drive)

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Link to comment
Share on other sites

Just now, Simpel said:

Hi. Look comments inside script:

If IsArray(Githy) = True Then ; What is Githy? It is no variable because there is no leading $ like $Githy and if it should be a variable it is not declared as anything - so the whole If IsArray Endif is skipped because False
    MouseDown("LEFT") ; is not done because the If above is false
EndIf

WEnd ; There is a Wend but no While - what for? A loop end w/o loop start?

MouseUp("LEFT") ; That is the only function your script does - that seems to make no sense

Func _Exit() ; Functions better stand at the end of your script - but your function never is fired because in the main script there in no _Exit() what would call this function
    Exit
EndFunc

Regards, Conrad

Githy is a Variable btw, I just left all the other script out

Link to comment
Share on other sites

Hi. $Githy is a variable - Githy not.

But back to your first question:

If IsArray($Githy) = True Then
    MouseDown("LEFT") ; if True
Else
    MouseUp("LEFT") ; if Not True (False)
EndIf

Conrad

SciTE4AutoIt = 3.7.3.0   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win_10   Build = 19044   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE     H:\...\AutoIt3      H:\...\AutoIt3\Include     (H:\ = Network Drive)

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Link to comment
Share on other sites

You could add a flag, so that the MouseUp would only occur following the MouseDown, something like:

If IsArray($Githy) = True Then
    MouseDown("LEFT") ; if True
    $isDown = True
ElseIf $isDown Then
    MouseUp("LEFT") ; if Not True (False)
    $isDown = False
EndIf

P.S. Can you give us more details on what your overall script is doing?

Link to comment
Share on other sites

9 minutes ago, Danp2 said:

You could add a flag, so that the MouseUp would only occur following the MouseDown, something like:

If IsArray($Githy) = True Then
    MouseDown("LEFT") ; if True
    $isDown = True
ElseIf $isDown Then
    MouseUp("LEFT") ; if Not True (False)
    $isDown = False
EndIf

P.S. Can you give us more details on what your overall script is doing?

 

Link to comment
Share on other sites

10 minutes ago, Danp2 said:

Its a Triggerbot

While 1
   $isDown = False
   $Githy = PixelSearch(760,410,840,490, 0xD04016, 3)
   If IsArray($Githy) = True Then

   MouseDown("LEFT") ; Set the left mouse button state as down.
    $isDown = True
ElseIf $isDown Then
    MouseUp("LEFT") ; Set the left mouse button state as up.
    $isDown = False
 EndIf
WEnd

 

Link to comment
Share on other sites

Just now, JLogan3o13 said:

A triggerbot for what game?

y does it matter?

A game that instead of spam clicking you can just hold down mouse to keep shooting with every weapon... which is why I need a script that will hold down LeftclickDown when crosshairs hoving over enemies and then LeftclickUp when not...

B.T.W. the crosshairs light up red when hoving over an enemy

Link to comment
Share on other sites

  • Moderators

It matters because our forum rules are very clear, we do not support game automation in any form. I suggest you read the forum rules before posting again.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...