Page 1 of 1 1
Topic Options
#24217 - 2002-07-02 12:15 AM Kixtart change?
tech_guy Offline
Fresh Scripter

Registered: 2001-12-02
Posts: 17
Since I have upgraded to the newer release of Kixtart the following scriptlet refuses to work:

Select
Case ((@INWIN = 1) AND (@DOS = 5.0))
$OS = "Win2K"
Case ((@INWIN = 1) AND (@DOS = 4.0))
$OS = "WinNT4"
Case ((@INWIN = 2) AND (@DOS >= 4.10))
$OS = "Win98"
Case ((@INWIN = 2) AND (@DOS = 4.0))
$OS = "Win95"
Case 1
$OS = "Not found"
EndSelect

I can go into debug mode and ?@DOS and ?@inwin and everything looks okay. Was there a change that would affect this?

Mike

Top
#24218 - 2002-07-02 12:48 AM Re: Kixtart change?
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
KiX now accepts real values.

@DOS returns a string, so you have to compare it with a string:

If $DOS = 5.0
Compares stringvalue '5.0' with real value 5.0 (always false)

Should be
If $DOS = '5.0'
Compares stringvalue '5.0' with string value '5.0' (True, if @DOS returns '5.0')

Your code should be changed to:
code:
Select
Case ((@INWIN = 1) AND (@DOS = '5.0'))
$OS = "Win2K"
Case ((@INWIN = 1) AND (@DOS = '4.0'))
$OS = "WinNT4"
Case ((@INWIN = 2) AND (@DOS >= '4.10'))
$OS = "Win98"
Case ((@INWIN = 2) AND (@DOS = '4.0'))
$OS = "Win95"
Case 1
$OS = "Not found"
EndSelect

-Erik

Top
#24219 - 2002-07-02 12:56 AM Re: Kixtart change?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11565
Loc: CA
IF you are using the new 4.x version of KiXtart take a look at @PRODUCTTYPE faster easier method to determine the OS TYPE

OS type. Possible values:
"Windows 95"
"Windows 98"
"Windows Me"
"Windows NT Workstation"
"Windows NT Server"
"Windows NT Domain Controller"
"Windows 2000 Professional"
"Windows 2000 Server"
"Windows 2000 Domain Controller"
"Windows XP Home Edition"
"Windows XP Professional"
"Windows .Net Server"
"Windows .Net Domain Controller"

Top
#24220 - 2002-07-02 01:05 AM Re: Kixtart change?
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Short version of OS-check using KiX 4.x:

code:
$OS = Split(@ProductType)[1]

This will return

95,
98,
Me,
NT,
2000,
XP
or .Net

-Erik

Top
#24221 - 2002-07-02 03:57 AM Re: Kixtart change?
tech_guy Offline
Fresh Scripter

Registered: 2001-12-02
Posts: 17
Thanks for the new info. You guys are the greatest!

[Smile]

Top
#24222 - 2002-07-02 03:58 AM Re: Kixtart change?
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Which release you were running?
What is your actual release now?
See UDF forum for a function which will return also the OS value.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 158 anonymous users online.
Newest Members
anhkfr, adamlevine, katherinknul, phamthuy, xuantu075
17631 Registered Users

Generated in 0.143 seconds in which 0.103 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org