Elrond5 Posted August 10, 2017 Posted August 10, 2017 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.
Elrond5 Posted August 10, 2017 Author Posted August 10, 2017 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.
Elrond5 Posted August 10, 2017 Author Posted August 10, 2017 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.
Developers Jos Posted August 10, 2017 Developers Posted August 10, 2017 Merged the 3 created topics and let's stick to one now for here on. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Elrond5 Posted August 10, 2017 Author Posted August 10, 2017 On 8/10/2017 at 10:36 AM, Jos said: Merged the 3 created topics and let's stick to one now for here on. Jos Expand oh sorry Jos I'm very sorry, I did that on accident... and btw could you help me?
Simpel Posted August 10, 2017 Posted August 10, 2017 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) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.
Elrond5 Posted August 10, 2017 Author Posted August 10, 2017 On 8/10/2017 at 11:06 AM, 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 Expand Githy is a Variable btw, I just left all the other script out
Simpel Posted August 10, 2017 Posted August 10, 2017 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) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.
Elrond5 Posted August 10, 2017 Author Posted August 10, 2017 Thats the script I came up with before, the problem is it keeps spamming "MouseUp" so I can't click...
Danp2 Posted August 10, 2017 Posted August 10, 2017 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? Latest Webdriver UDF Release Webdriver Wiki FAQs
Elrond5 Posted August 10, 2017 Author Posted August 10, 2017 On 8/10/2017 at 12:17 PM, 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? Expand
Elrond5 Posted August 10, 2017 Author Posted August 10, 2017 On 8/10/2017 at 12:17 PM, 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 Expand
Moderators JLogan3o13 Posted August 10, 2017 Moderators Posted August 10, 2017 A triggerbot for what game? "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!
Elrond5 Posted August 10, 2017 Author Posted August 10, 2017 On 8/10/2017 at 12:33 PM, JLogan3o13 said: A triggerbot for what game? Expand 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
Moderators JLogan3o13 Posted August 10, 2017 Moderators Posted August 10, 2017 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!
Recommended Posts