Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_winver
#1
How come whenever i use _winver i get "1281" as my windows version??

I have XP so shouldnt i get "0x501 " ????
#2
It is the same value, but 0x is in hexadecimal form. By default out shows decimal form. To out an integer number in hexadecimal form, use this:

out "0x%X" _winver

To compare, no conversion is required.

if(_winver=0x501)

is the same as

if(_winver=1281)
#3
OK, thanks, now i understand!
#4
out "Your Version: 0x%X" _winver

Is there any way to assign this to a variable instead of outing it??

for example....this doesnt work but its what i need to do,

str VERsionID

VERsionID = "Your Version: 0x%X" _winver

then i can do what i need with the str for example put it into a message! but in hex form instead of just decimal form??
#5
The same string formatting can be used in out, mes, and str.format. The difference is where the result is stored. str.format stores the result into the str variable instaed of showing in QM output or message box. The 'Text' dialog can help you to format strings.

VERsionID.format("Your Version: 0x%X" _winver)
#6
WOW Thanks gint you ahve done it again thats perfect!


Forum Jump:


Users browsing this thread: 1 Guest(s)