Page 1 of 1 1
Topic Options
#22452 - 2002-05-31 02:22 AM Win 95/98 and Win 2k/XP
jamen Offline
Fresh Scripter

Registered: 2002-05-31
Posts: 13
I have a script that works fine in windows 95/98 but not windows 2000/xp. The code looks something like this:


$cc = 0
$key = 0

if Ingroup("xxxx")
$cc = 1
endif

if Ingroup("yyyy")
$key = 1
endif

if $cc = 1 and $key = 1

At (9,12) "Please choose one of the following classes:
1 Computer Concepts
2 Beginning Keyboarding
Selection : "
Get $selection
select
case ($selection = 1)
use v: "\\server\xxxx$"
case ($selection = 2)
use v: "\\server\yyyy$"
case (1)
? "That is not a valid option"
endselect
sleep 2
endif
if $cc = 1 and $key = 0
use v: "\\server\xxxx$"
endif
if $key = 1 and $cc = 0
use v: "\\server\yyyy$"
endif

I am a newbie, and can't seem to figure why it would be any different for W2k/xp. I have KXRPC installed, and all the required files on the DC's. Works just fine in 95/98.... When I make a selection it comes up with "That is not a valid option", Only on w2k/xp. Any ideas???

Top
#22453 - 2002-05-31 02:28 AM Re: Win 95/98 and Win 2k/XP
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Try wrapping the numbers in quotes.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#22454 - 2002-05-31 02:36 AM Re: Win 95/98 and Win 2k/XP
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
I reworded it some, but it works for me on 2000 using KiXtart v4.02

code:
$cc = 0
$key = 0

if Ingroup("Administrators")
$cc = 1
? " You are in the Admin group.."
GET $x
endif

CLS
if Ingroup("Power Users")
$key = 1
endif

if $cc = 1 and $key = 1

At (9,12) "Please choose one of the following classes:
1 Computer Concepts
2 Beginning Keyboarding
Selection : "
Get $selection
select
case ($selection = 1)
? "You chose option 1"
;use v: "\\server\xxxx$"
case ($selection = 2)
? "You chose option 2"
;use v: "\\server\yyyy$"
case (1)
? "That is not a valid option"
endselect
sleep 2
endif
if $cc = 1 and $key = 0
? "No choice Drive xxxx will be mapped"
;use v: "\\server\xxxx$"
endif
if $key = 1 and $cc = 0
? "No choice Drive yyyy will be mapped"
;use v: "\\server\yyyy$"
endif


Top
#22455 - 2002-05-31 08:03 PM Re: Win 95/98 and Win 2k/XP
jamen Offline
Fresh Scripter

Registered: 2002-05-31
Posts: 13
Tried quotes around the numbers and still, no go... Should I try something with an @inwin? Any thoughts are appreciated...

Thanks,
Ben

Top
#22456 - 2002-05-31 09:30 PM Re: Win 95/98 and Win 2k/XP
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Run the script in debug mode, put DEBUG ON in the first line of the script. This will allow you to step through the script and see which lines it's executing.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.054 seconds in which 0.024 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