GreenGiant wrote:The value you're putting into the variable is bigger than that type of variable can hold. Look under 'Variables, Types and Operators' in the manual
Nope, that isn't the reason. You could have seen this also if you'd had a look at the code.
The reason is simple: $FF and $FFFF are longs and the Long-values for them are different then the Byte- and Word-Values.
With the comparison, all values are internally converted to Long.
GreenGiant wrote:The value you're putting into the variable is bigger than that type of variable can hold. Look under 'Variables, Types and Operators' in the manual
OK, thanks for your reply.
I know that you say, but I work on memory raw data.
Nope, that isn't the reason. You could have seen this also if you'd had a look at the code
The fact is that $FF equals 255 and was being put into byte variable which can only handle a value up to 127. Similarly, $FFFF is 65535 and was being put into a word variable which can only hold numbers up to 32767. If you alter the hexidecimal values to be within the range of the variable type, then it will work.
This works because a long is big enough to fit the $FFFF value in.
:roll: You could also put some Delay(100) into the code to make it even more slow
@PicardDontoro: Just don't use Words or Bytes, they are hardly ever needed (99% of my variables are surely Longs). Mostly they are needed for compatibility reasons with the WinAPI or to save memory in large Arrays.