Jump to content

Multi Coordinates for Pixel Search


Recommended Posts

I currently have this but it keeps looping. What I want it to do is for it to start doing the function associated with the coordinates and pixel color. Any help would be great! Thank you!

#SingleInstance force
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
#IfWinActive ahk_exe dnplayer.exe
ListLines Off
Process, Priority, , A
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
toggle = 0

CoordMode, PIXEL, SCREEN
CoordMode, MOUSE, SCREEN

6:: ; Press X to toggle the bot On/Off.

loop{
    send {-}
    sleep 150

 ;PixelSearch, FoundX, FoundY, 3126, 633, 3194, 701, 0xF86B34, 2, Fast RGB
 ;PixelSearch, FoundX, FoundY, 2250, 630, 2312, 656, 0xDB2006, 2, Fast RGB
 ;PixelSearch, FoundX, FoundY, 2250, 630, 2312, 656, 0xF86B34, 2, Fast RGB
 ;PixelSearch, FoundX, FoundY, 2249, 633, 2311, 703, 0xEB3001, 2, Fast RGB
  ;PixelSearch, FoundX, FoundY, 2249, 633, 2311, 703, 0xED3200, 2, Fast RGB
  ;PixelSearch, FoundX, FoundY, 2272, 834, 2279, 840, 0xED3200, 2, Fast RGB
  ;PixelSearch, FoundX, FoundY, 2266, 832, 2279, 843, 0xED3200, 2, Fast RGB
  ;PixelSearch, FoundX, FoundY, 2266, 927, 2280, 938, 0xED3200, 2, Fast RGB
PixelSearch, FoundX, FoundY, 2265, 639, 2277, 647, 0xED3200, 0, Fast RGB
    if ErrorLevel = 0
    goto, HP1
    
PixelSearch, FoundX, FoundY, 2264, 735, 2278, 746, 0xED3200, 0, Fast RGB
    if ErrorLevel = 0
    goto, HP2
    
PixelSearch, FoundX, FoundY, 2266, 831, 2278, 842, 0xED3200, 0, Fast RGB
    if ErrorLevel = 0
    goto, HP3
    
PixelSearch, FoundX, FoundY, 2266, 928, 2278, 936, 0xED3200, 0, Fast RGB
    if ErrorLevel = 0
    goto, HP4

 }
 return
 
 HP1:
 {
 sleep 650
 Send {1}
 return
 }
 
  HP2:
 {
 sleep 650
 Send {2}
 return
 }
 
  HP3:
 {
 sleep 650
 Send {3}
 return
 }
 
  HP4:
 {
 sleep 650
 Send {4}
 return
 }
 
 End::exitapp
Home::reload 
PgUp::Suspend

 

Link to comment
Share on other sites

  • Moderators

ralph00,

Welcome to the AutoIt forum. But are you sure you are in the right place as that code is definitely NOT AutoIt - could it be AutoHotKey? If so you might do better posting on their forum.

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:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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