Help - Search - Members - Calendar
Full Version: Need a push in the right Direction.
AC Tools Everything Macro > AC Tool Macros > Other Macros
Sourpower
Just started using this program, since I'm more of a hands on learner hoping to get a push in the right direction not someone doing it for me.
I have read the help files and all that but ended up confusing me a bit more. What I'm trying to do is make a macro that will click Up Down Left or Right depending on the color of the given location. I'm not sure if it possible but to give more detail would be that if the red is at the top part it will click the up button and if the red is in the down spot it will click down and so on. I'm not insanely sure on how to do it I've saw some other similar posts but were for different things. I feel kind of stupid for not being able to figure out this.
LoadRGB 266, 285
{DOWN}
Delay 100
LoadRGB 266, 271
{UP}
Delay 100
LoadRGB 260, 278
{LEFT}
Delay 100
LoadRGB 272, 278
{RIGHT}
Delay 100

Thats what I did and feel stupid sad.gif
Bear
You got the LoadRGB MouseX, MouseY, correct but then your not doing any checking for the colors it finds, Once you do a LoadRGB the colors for the position are stored in the Variables, {RGBRed}, {RGBGreen} and {RGBBlue}.. Also look at Timestamp... after each of your LoadRGB try adding a "Timestamp {RGBRed}, {RGBGreen}, {RGBBlue}" then run your macro and then look in the Test log tab.
Sourpower
Not sure if this was 100% right but.
Delay 100
LoadRGB 266, 285
Timestamp {RGBRed}, {RGBGreen}, {RGBBlue}
{DOWN}
Delay 100
LoadRGB 266, 271
Timestamp {RGBRed}, {RGBGreen}, {RGBBlue}
{UP}
Delay 100
LoadRGB 260, 278
Timestamp {RGBRed}, {RGBGreen}, {RGBBlue}
{LEFT}
Delay 100
LoadRGB 272, 278
Timestamp {RGBRed}, {RGBGreen}, {RGBBlue}
{RIGHT}
Delay 100

Got the error TimeStamp: 10/31/2009 05:30:48:472 am - 191, 255, 255
Guessing the X, Y is off or Im getting stupider.
Bear
And you get an Error at {Down}...

try this and look at the Test log.

CODE

Constants
Red_Var = 5 // Changing this effects both High and Low checking Values.
Red_Low = 0
Red_High = 0
End

LoadRGB 266, 285
Timestamp Value of Red ( {RGBRed} )
Timestamp Value of Green ( {RGBGreen} )
Timestamp Value of Blue ( {RGBBlue} )
// TimeStamp: 10/31/2009 05:30:48:472 am - 191, 255, 255
// Red = 191, Green = 255, Blue = 255
Compute Red_Low = {RGBRed} - $Red_Var
Compute Red_High = {RGBRed} + $Red_Var
Timestamp Red ( {RGBRed} }, Low ( $Red_Low ), High ( $Red_High )
IF {RGBRed} < $Red_High and {RGBRed} > $Red_Low and {RGBGreen} > 250 and {RGBBlue} > 250
keys {DOWN}
End
Sourpower
I get
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Red ( 0 )
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Green ( 0 )
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Blue ( 0 )
TimeStamp: 11/01/2009 02:20:53:50 am - Red ( 0 }, Low ( -5 ), High ( 5 )
DaMOB
QUOTE(Sourpower @ Nov 1 2009, 05:21 AM) *
I get
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Red ( 0 )
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Green ( 0 )
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Blue ( 0 )
TimeStamp: 11/01/2009 02:20:53:50 am - Red ( 0 }, Low ( -5 ), High ( 5 )

R = 0, G = 0, B = 0 means it is pure black and R = 255, G = 255, B = 255 means it is pure white. Just wanted to let you know.
Sourpower
QUOTE(DaMOB @ Nov 1 2009, 06:50 AM) *
QUOTE(Sourpower @ Nov 1 2009, 05:21 AM) *
I get
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Red ( 0 )
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Green ( 0 )
TimeStamp: 11/01/2009 02:20:53:34 am - Value of Blue ( 0 )
TimeStamp: 11/01/2009 02:20:53:50 am - Red ( 0 }, Low ( -5 ), High ( 5 )

R = 0, G = 0, B = 0 means it is pure black and R = 255, G = 255, B = 255 means it is pure white. Just wanted to let you know.

Which is odd since it should be 255, 000 , 000. The arrows are from my sight are almost pure red besides the outline which are a brownish red. Should I get a exact point where only the red exists and not the brownish red too? I got it to work somewhat but then it would wack out and press the wrong button making it spazz out and run in different directions until the loop was complete.

Found out the arrows are 230, 0 , 0 and the basic outlining of it is 204, 0 , 0

Starting to feel more and more stupid trying to figure out why it isn't working, racking my brain trying to figure this out sad.gif
Bear
QUOTE(Sourpower @ Nov 1 2009, 04:54 AM) *
Found out the arrows are 230, 0 , 0 and the basic outlining of it is 204, 0 , 0


Can you attach a Screenshot of what it is your trying to do?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.