Jump to content

New to Autoit, Having trouble with PixelSearch


Recommended Posts

Hi, I'm new to Autoit but not to programming. My experience is with C# but Autoit seems like the choice for Botting. I'm sorry if this is the wrong place to post this Topic, If it is then please take it down.

First off, I've been reading alot of tutorials along with samples on how to use 'PixelSearch' but I'm still having alot of trouble and its driving me insane. I've been trying to successfully come up with a resolution but still, I'm stuck.

What I'm trying to do is simple...So I would like it to be...Here is what I have and what I would like it to do.

While $Run

WinActivate("Diablo III")

CheckInventory()

WEnd

Func CheckInventory()

If $BotIsInventoryOpen Then

$BotIsLookingAtItems = True

Sleep(200)

MouseMove(1256, 585, 10); (Column 1, Row 1)

CheckItem()

Sleep(200)

Else

Sleep(500)

Send("{I}")

Sleep(500)

If PixelGetColor(1471, 169) = 0xFFA300 Then

$BotIsInventoryOpen = True

EndIf

EndIf

EndFunc

Func CheckRareItem()

ToolTip("")

$Pos = MouseGetPos()

$coord = PixelSearch($Pos[0] -15, $Pos[1] -15, $Pos[0] +15, $Pos[1] +15, 0xFFFFFF)

Sleep(1000)

If Not @error Then

ToolTip("Rare Item")

EndIf

EndFunc

Link to comment
Share on other sites

  • Moderators

IamMike4Life,

Autoit seems like the choice for Botting

It might well be - but we do not support such usage here. Please read the rules to which you were linked and abide by them in future. ;)

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...