Jump to content

Can I Do this? (project layout)


Go to solution Solved by somdcomputerguy,

Recommended Posts

I need to make something a little more complicated than what I might be capable of.

Here's what i need a program to do. (I used to program Qbasic, C++, but it's been a couple decades, go easy on me)

Note, i'm NOT asking someone to do it for me. I'm not that kind of person. I just dont want to start hunting for commands and architecture to find out my idea was impossible.

---------------

my program idea

---------------

Start program (probably WindowsKey-A)

Wait for left mouse button click

Record click location as Location1

Record color of pixel as Color1

Wait for another left mouse button click

Record click location as Location2

Record color of pixel as Color2

Wait for another left mouse button click

Record click location as primaryclick

wait 5000

for i = 1,500

if

pixelcolor@Location1==Color1 AND pixelcolor@Location2==Color2  

then end

else wait 500 and repeat check of pixels

-----------------------

Okay so that was a mess. Here it is in plain english

I want to grab location and color on two pixels. Once the program is running, the next iteration of the loop wont be allowed to start unless both those pixels are back to the starting colors.

Once we've got that, each loop will consist of

10: Click

20: 5 second wait

30: check on the pixels, which if it fails, will rest for 500ms then check again

40: Once the pixels BOTH return true, GOTO 10

 

Hopefully one of those made sense. Can this jumble mess of thoughts be done?

Edited by seanbrockest
Link to comment
Share on other sites

  • Solution

I believe this can be done. Here is a list of AutoIt functions that I think you would need..

  • Run or ShellExecute
  • _Ispressed
  • MouseGetPos
  • PixelGetColor
  • Sleep

Along with loops of course, While..WEnd, For..Next, If..EndIf.

There is example code for each of these functions in the Help file.

Good Luck with your project!

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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