blacksniper Posted March 4, 2008 Share Posted March 4, 2008 If (PixelGetColor($ThiredLaserIcon[0], $ThiredLaserIcon[1]) = Dec("000000")) Can someone explain this line to me. $thiredlasericon[0] is a X cordinate and $thiredLaserIcon[1] is a y cordinate But what i dont under stand is the Dec part of this Helpfile says Returns a numeric representation of a hexadecimal string. But that looks like a html Color code to me. The peace of code is sposta work like this Check x,y if number = green then I didnt write this peace of code but i am trying to understand how that is going to work. can Anyone give me some help? thanks Blacksniper Link to comment Share on other sites More sharing options...
weaponx Posted March 4, 2008 Share Posted March 4, 2008 (edited) Thats not a hex code. You also can't put quotes around the parameter for Dec(). Should be Dec(0x0000FF)I was wrong, see below. Edited March 4, 2008 by weaponx Link to comment Share on other sites More sharing options...
blacksniper Posted March 4, 2008 Author Share Posted March 4, 2008 thanks thats what i thought, Thanks Link to comment Share on other sites More sharing options...
martin Posted March 4, 2008 Share Posted March 4, 2008 Thats not a hex code. You also can't put quotes around the parameter for Dec(). Should be Dec(0x0000FF)Wow, that's not right!Dec(0xf) gives 21 = wrongDec("0f") gives 15 = correctDec(0x0000ff) gives 597 = wrongDec("0000ff") gives 255 = correctThe parameter should be a hex string as stated in the help. The code in the OP is correct. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
weaponx Posted March 4, 2008 Share Posted March 4, 2008 Wow, that's not right!Dec(0xf) gives 21 = wrongDec("0f") gives 15 = correctDec(0x0000ff) gives 597 = wrongDec("0000ff") gives 255 = correctThe parameter should be a hex string as stated in the help. The code in the OP is correct.You are correct sir. I think I was thinking of Int(). Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now