Jump to content

How to get pixelsearch to click on the same colour but different pixels?


Recommended Posts

So I wrote this script

   Local $coord1 = PixelSearch ($leftInv, $topInv, $rightInv, $bottomInv, 0x9DA1BD, 5)
   If not @error Then
   MouseClick("left", $coord1[0], $coord1[1])

It clicks on the colour and everything, but what I want is for it to click on other pixels of the same colour in the area. I put it in a loop and it still clicks on the same pixels every time. How do I change it so it clicks on the same colour, but on different coordinates?

Edited by PEscobar
Clarfication
Link to comment
Share on other sites

So I wrote this in a script

   Local $coord1 = PixelSearch (13, 156, 1884, 985, 0xFFFFFF, 1)
   If not @error Then
   MouseClick("left", $coord1[0], $coord1[1])

It clicks on the correct colour, but the problem is that it clicks on the same coordinates that it originally got the colour from. There are many pixels of the same colour in the region so I know that isn't the problem. I also put it in a loop so $coord1 should be different every time it runs through it shouldn't it?

Link to comment
Share on other sites

Global $leftInv = 840
Global $topInv = 332
Global $rightInv = 1026
Global $bottomInv = 590
WithdrawHerb()
WithdrawVial()
ExitBank()
$coord1 = PixelSearch ($leftInv, $topInv, $rightInv, $bottomInv, 0x9DA1BD, 5)
If not @error Then
    MouseClick("left", $coord1[0], $coord1[1])
EndIf
$coord2 = PixelSearch ($leftInv, $topInv, $rightInv, $bottomInv, 0x385905, 5)
If not @error Then
    MouseClick("left", $coord2[0], $coord2[1])
EndIf

Looks like gameplay automation, WoW or maybe even Rift.

Link to comment
Share on other sites

  • Moderators

PEscobar,

You seem to have problems understanding our stance on gamebots. I suggest you make some effort to do so because the next time you post a game-related question you will be sanctioned.

Threads merged and locked.

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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