Jump to content

"And" - - -"While"


Recommended Posts

Hey Guys ;)

Im pretty new at this AutoIT and I have 2 questions.

First, is it possible to do "If Pixelsearch(x, y, 0x00000) and Pixelsearch(x, y, 0x10000) then /do-something?

So if both Pixel matches then do something otherwise ignore?

And second, I'm currently using 10 scripts'ish on my PC and it's really messy and hard to stop if something goes wrong, they all look like this'ish:

i = 0
While $i <= 10
$coord = PixelSearch(481, 482, 549, 495, 0XBC9973)
If Not @error Then
MouseClick("primary", $coord[0], $coord[1], 1, 0)

Is it possible to make all of them into 1 script while they still do the same ?

Edited by affelol45
Link to comment
Share on other sites

first question:

$a = PixelSearch()
$b = PixelSearch()
If IsArray($a) And IsArray($b) Then
    ;something
Else

EndIf

second question:

probably but if anyone is to help you they need to add more info for about what are you trying to do

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

Ahh okay thanks :)

As for the 2nd question, I've made a "Whack-a-mole" game my self, and to test it out I made autoit click the moles so I could advance and test it abit.

So I have 10 scripts, each searching for 1 pixel each (different colored moles) and when they find it they click it

Link to comment
Share on other sites

  • Moderators

affelol45,

As pieeater has mentioned, there is a strict "no game automation" rule here. It does not matter if it is your own game, this rule is "zero tolerance" and strictly enforced. :naughty:

Please read those Forum Rules and stick to 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...