| View previous topic :: View next topic |
| Author |
Message |
mmmmmmpixels Guest
|
Posted: Wed Aug 27, 2008 9:13 am Post subject: PixelGetColor and If statement |
|
|
| Code: | PixelGetColor, OutputVar, %x%+0, %y%+2,RGB
if (OutputVar = 0xFFFFFF) |
Hey just wondering should this work? not sure if ahk knows how to compare them in IF statement, maybe I should enclose 0xFFFFFF in quotes to treat it as string? |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Wed Aug 27, 2008 9:25 am Post subject: |
|
|
| Quote: | | Hey just wondering should this work? | What about to try it? That would have needed 1/3 of the time to write your request. If it's not working (after you've tested it on your own) RTFM to get enlighted. |
|
| Back to top |
|
 |
mmmmmmmmpixels Guest
|
Posted: Wed Aug 27, 2008 9:37 am Post subject: |
|
|
| BoBo² wrote: | | Quote: | | Hey just wondering should this work? | What about to try it? That would have needed 1/3 of the time to write your request. If it's not working (after you've tested it on your own) RTFM to get enlighted. |
ehh thanks for the wisdom, but i am trying it, you want to see the size of the script? its huge, im trying to debug it and im new to ahk looking through the documentation i find its very limited in the variable area, just gives a few examples and thats that.[/b] |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Wed Aug 27, 2008 9:58 am Post subject: |
|
|
I don't think so. [Variables]  |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Aug 27, 2008 10:09 am Post subject: |
|
|
Sorry read it, didn't see a mention of hex numbers and wether they are ever considered a number or not for math operators.
If you dont know the answer BoBo just give me a break, find something constructive to do with your time |
|
| Back to top |
|
 |
Wicked - Guest Guest
|
Posted: Wed Aug 27, 2008 10:17 am Post subject: |
|
|
| Code: | PixelGetColor, OutputVar, %x%+0, %y%+2,RGB
if (OutputVar == "0xFFFFFF") |
|
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Wed Aug 27, 2008 1:31 pm Post subject: |
|
|
| Quote: | | find something constructive to do with your time | Done. Thx for your friendly advise.  |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1496
|
Posted: Wed Aug 27, 2008 7:26 pm Post subject: Re: PixelGetColor and If statement |
|
|
| Code: | ; PixelGetColor, OutputVar, %x%+0, %y%+2,RGB ; erroneous syntax
PixelGetColor, OutputVar, x+0, y+2,RGB ; recommended
if (OutputVar = 0xFFFFFF) ; nothing wrong with this, hex and dec ints are treated the same internally
msgbox, yeah |
_________________ My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags ! |
|
| Back to top |
|
 |
|