AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PixelGetColor and If statement

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
mmmmmmpixels
Guest





PostPosted: Wed Aug 27, 2008 9:13 am    Post subject: PixelGetColor and If statement Reply with quote

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





PostPosted: Wed Aug 27, 2008 9:25 am    Post subject: Reply with quote

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





PostPosted: Wed Aug 27, 2008 9:37 am    Post subject: Reply with quote

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





PostPosted: Wed Aug 27, 2008 9:58 am    Post subject: Reply with quote

I don't think so. [Variables] Confused
Back to top
Guest






PostPosted: Wed Aug 27, 2008 10:09 am    Post subject: Reply with quote

BoBo² wrote:
I don't think so. [Variables] Confused


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





PostPosted: Wed Aug 27, 2008 10:17 am    Post subject: Reply with quote

Code:
PixelGetColor, OutputVar, %x%+0, %y%+2,RGB
  if (OutputVar == "0xFFFFFF")
Back to top
BoBo²
Guest





PostPosted: Wed Aug 27, 2008 1:31 pm    Post subject: Reply with quote

Quote:
find something constructive to do with your time
Done. Thx for your friendly advise. Cool
Back to top
[VxE]



Joined: 07 Oct 2006
Posts: 1496

PostPosted: Wed Aug 27, 2008 7:26 pm    Post subject: Re: PixelGetColor and If statement Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group