Elrond5

Mouse up/ Mouse down

16 posts in this topic

#1 ·  Posted

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted

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.

Share this post


Link to post
Share on other sites

#3 ·  Posted

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.

Share this post


Link to post
Share on other sites

#5 ·  Posted

8 minutes ago, Jos said:

Merged the 3 created topics and let's stick to one now for here on.

Jos

oh sorry Jos I'm very sorry, I did that on accident... and btw could you help me?

Share this post


Link to post
Share on other sites

#6 ·  Posted

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


SciTE = 3.6.2.0/full   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win7Pro SP1   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.

Share this post


Link to post
Share on other sites

#7 ·  Posted

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

Share this post


Link to post
Share on other sites

#8 ·  Posted

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


SciTE = 3.6.2.0/full   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win7Pro SP1   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.

Share this post


Link to post
Share on other sites

#9 ·  Posted

Thats the script I came up with before, the problem is it keeps spamming "MouseUp" so I can't click...

Share this post


Link to post
Share on other sites

#10 ·  Posted

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?

Share this post


Link to post
Share on other sites

#11 ·  Posted

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?

 

Share this post


Link to post
Share on other sites

#12 ·  Posted

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

 

Share this post


Link to post
Share on other sites

#13 ·  Posted

should I make $isDown = false?

Share this post


Link to post
Share on other sites

#14 ·  Posted

A triggerbot for what game?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#15 ·  Posted

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

Share this post


Link to post
Share on other sites

#16 ·  Posted

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.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.