Jump to content
Sign in to follow this  
easycode

Need Some Help Please!

Recommended Posts

easycode

hello every1!

Im pretty new at AutoIT and im trying to learn by myself how to do nice script!

well, i will show a exemple of what i want to do with auoit.

Image ex:

Posted Image

P.S: Sry for the pic.. xD i tried my best.. >.<

Ok what i want to do with this? I will try explain my best. The guy in the middle is inside of a rectangle and the round balls are , let see..., well they can be gifts. :)

So what i wanna do is : i want the "guy" search for that round balls and then when he found they, i want he pick the gifts.

well i tried a few things , like pixelsearch & pixelchecksum but i cant get this to work.

Im asking then for a few ideas to make this work and few tips how i can make this possible.

Ty every1!

I got something to work:

Global $box = PixelSearch(7,54,1026,627,0x62667C)

HotKeySet ("{1}","quit")

winwait("mytest","")
WinWaitActive("mytest","")
sleep(1000)

while 1

bonus_box()


WEnd

Func bonus_box ()



while 1


If PixelSearch(7,54,1026,627,0x62667C) <> $box Then ;so what im thinking is: if the pixelsearch is diferent to $box
; the program go search from the correct match at that coord
MouseClick("left",894,596,1)
sleep(20000)
MouseClick("left",953,548,1)
sleep(20000)
MouseClick("left",979,599,1)
sleep(20000)
MouseClick("left",960,611,1)
sleep(20000)
MouseClick("left",978,575,1)
sleep(20000)
MouseClick("left",885,532,1)
sleep(20000)
MouseClick("left",938,536,1)
sleep(20000)
MouseClick("left",956,554,1)
sleep(20000)
MouseClick("left",895,533,1)
sleep(20000)
MouseClick("left",852,561,1)
sleep(20000)
MouseClick("left",877,593,1)
sleep(20000)
MouseClick("left",917,599,1)
sleep(20000)
MouseClick("left",850,611,1)
sleep(20000)
MouseClick("left",852,566,1)
sleep(20000)
MouseClick("left",913,567,1)
sleep(20000)

ElseIf IsArray ($box) = True Then ; well this is suposse to check if the program finally got a match, if true the
MouseClick("left",$box[0],$box[1],3) ;the program go and click at the box to get the box, am i right?

EndIf
WEnd


EndFunc

Ok, so i can now make the thing move but now im getting a problem.

When the "thing" starts walk around and pass for a gift box he just ignore the gift box >.<!

Can some1 tell me how to write the code to make the "thing" pick up the gift box and continue walking normaly?

Edited by easycode

Share this post


Link to post
Share on other sites
Melba23

easycode,

Welcome to the AutoIt forum. :)

This looks very much like a game that you are trying to automate. Please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. :naughty:

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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×