Jump to content

Recommended Posts

Posted

Hello,

I'm just starting with autoit.

I have a question. I wrote a short script. How do you add to it to check if the given coordinate is in a given color, if so, then click the right mouse button?

It's my script:

 

  Quote

HotKeySet("{F8}", "Terminate")

Func Terminate()
Exit 0
EndFunc

$i = 0

Do
MouseClick("right", 698, 393, 1, 1)
Sleep (1)
MouseClick("left", 790, 591, 1, 1)
Sleep (1)
MouseClick("left", 844, 657, 2, 1)
Sleep (1)
MouseClick("left", 931, 448, 1, 1)
Sleep (10)
$i += 1
Until $i = 1000

Expand  

 

Posted (edited)

The best way is to click in the specyfic element, not in color.
Could you be more specific in the description of what you are trying to automate?

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
Element? Is it faster? 
I want to automate gaining things in the game. When she appears in this place, she wants to take her. There are 3 things. Two concern me, one does not concern me, so I have to use two colors.

 

Posted
  Quote

HotKeySet("{F8}", "Terminate")

Func Terminate()
Exit 0
EndFunc

$i = 0

Do
$zmienna = PixelSearch( 694, 388, 694, 388, 0x9C8418 )
if not @error Then
MouseClick("right", 694, 388, 1, 1)
EndIf
Sleep (1)
MouseClick("left", 790, 591, 1, 1)
Sleep (1)
MouseClick("left", 844, 657, 2, 1)
Sleep (1)
$i += 1
Until $i = 1000

 

Expand  
I dug and created something like that. However, once he clicks the right one, then he does not repeat it anymore. What should I add?
  • Moderators
Posted

Epicface,

FrancescoDiMuro is quite right - please read the Forum rules - particularly the bit about not discussing game automation - before you post again.  Thread locked.

But welcome to the AutoIt forum - and see you soon with a legitimate question I hope.

M23

 

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

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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