Page 1 of 2 12>
Topic Options
#23059 - 2002-06-12 10:56 PM If InGroup (how does it work? how to handle multiple groups?)
Troy Edwards Offline
Fresh Scripter

Registered: 2002-06-12
Posts: 23
Loc: Dallas, TX
Ok. Here is what I got:

CLS

$ErrorFile = "$server2\Errorlogs\@wksta_err.txt"

? "Logon Server: " @lserver

; --Set Workstation Time
SetTime "*"
? "Time syncronized with the server"

IF INGROUP ("Drafting") RUN "net use n: \\cluster1\drafting"

IF INGROUP ("Domain Admins", 1) RUN "net use x: \\cluster1\mis"

IF INGROUP ("Quickpen") RUN "net use q: \\cluster1\quickpen"

IF INGROUP ("McCormick") RUN "net use k: \\cluster1\mccormic

IF INGROUP ("Project Management") RUN "net use p: \\cluster1\projmgmt"

IF INGROUP ("Service") RUN "net use s: \\cluster1\service"

IF INGROUP ("Controls") RUN "net use g: \\cluster1\controls"

IF INGROUP ("Engineering") RUN "net use j: \\cluster1\engineering"

IF INGROUP ("Sales") RUN "net use i: \\cluster1\sales"

IF INGROUP ("Maxwell") RUN "net use m: \\ntmaxwell\maxwell"

IF INGROUP ("Billing") RUN "net use l: \\cluster1\billing"

IF INGROUP ("Data Processing") RUN "net use o: \\cluster1\dp"

IF INGROUP ("Payroll") RUN "net use r: \\cluster1\payroll"

IF INGROUP ("Estimating") RUN "net use h: \\cluster1\estimating"

IF INGROUP ("Constructware") RUN "net use v: \\cluster1\constructware"

IF INGROUP ("Electrical") RUN "net use w: \\cluster1\electrical"


exit

For some reason it doesn't recognize anyone in any group. They are setup on the server (Windows 2000), and I have multiple OS's for the Users (Win 9x, NT 4, and 2000). Please help. Thanks. [Confused]

(MCA: complete subject)

[ 17 June 2002, 09:00: Message edited by: MCA ]
_________________________
Troy Edwards IS Manager Brandt Engineering Co.

Top
#23060 - 2002-06-12 11:01 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
each if needs an endif
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#23061 - 2002-06-12 11:03 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
btw...

You don't need the run statements either.

IF INGROUP ("Drafting") use n: "\\cluster1\drafting" endif

IF INGROUP ("Domain Admins", 1) use x: "\\cluster1\mis" endif

IF INGROUP ("Quickpen") use q: "\\cluster1\quickpen" endif

[ 12 June 2002, 23:10: Message edited by: Radimus ]
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#23062 - 2002-06-12 11:04 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
code:
	if ingroup("Area_Impromptu")
use e: "\\mad\CAU"
use g: "\\c1dm3\INSP_HQA"
use z: "\\mad\MISAPPS"
? color c+/n " Impromptu Global Group" color w/n " drives " color w+/n "E: G: Z:" color w/n
endif
if ingroup("Area_DMS")
use m: "\\c1dm3\dma$area"
? color c+/n " Disease Management Global Group" color w/n " drives " color w+/n "M:" color w/n
endif
if ingroup("Area_HMO")
use n: "\\c1dm3\hmo"
? color c+/n " HMO WC&C Unit Nurses Global Group" color w/n " drives " color w+/n "N:" color w/n
endif
if ingroup("Area_legal")
use l: "\\itss\pmwin" ; L & M are required for Practice Manager
use m: "\\c1dm3\pmwin"
use t: "\\mad\westpub" ; T & U are required for Premise/Westpub
use u: "\\oagcdwins\ahcce1$$"
use q: "\\fdhctlh10\cch" ; Q, R, & W are required for CCH
use r: "\\fdhctlh10\cchkar02"
use w: "\\fdhctlh10\cchkar03"
use v: "\\mad\shepards" ; V is required for Shepards
? color c+/n " Legal Group"color w/n " drives "color w+/n "Q: R: T: U: V: W:"color w/n
endif

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#23063 - 2002-06-12 11:08 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Troy Edwards Offline
Fresh Scripter

Registered: 2002-06-12
Posts: 23
Loc: Dallas, TX
It says unknown or unexpected command [net]
_________________________
Troy Edwards IS Manager Brandt Engineering Co.

Top
#23064 - 2002-06-12 11:10 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
oops, when I copied/pasted your code, I left a 'net' in there it should just be use

see the other examples
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#23065 - 2002-06-12 11:12 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Troy Edwards Offline
Fresh Scripter

Registered: 2002-06-12
Posts: 23
Loc: Dallas, TX
I got it to recognize one group. How do I get it to notice multiple groups? Thanks for the help. [Confused]
_________________________
Troy Edwards IS Manager Brandt Engineering Co.

Top
#23066 - 2002-06-12 11:15 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
if ingroup("group1") or ingroup("group2")

if ingroup("group1") and ingroup("group2")

if ingroup("group1") and ingroup("group2")=0

if ingroup("group1")=0 or ingroup("group2")=0

if you are using kix 4 or better you can use NOT

if not ingroup("group1") and not ingroup("group2")
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#23067 - 2002-06-12 11:23 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
btw... If you are looking for 'REAL' help beyond the posting/answering of questions and such here.

One of the more reknowned members of this board Bryce, lives in Houston. [Wink]

But that is strictly as an aside...

Welcome to Kixtart... Once you get familliar with it, you'll wonder how you ever got along without it. We have been running contests here trying to find something that absolutely cannot be done with Kix.

With 2 exceptions...
1) No force on earth can make a user read, understand, and answer a question.
2) IDSoftware prohibits us from replication the source code of Quake 3 in Kix [Big Grin]
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#23068 - 2002-06-12 11:26 PM Re: If InGroup (how does it work? how to handle multiple groups?)
FollowThisLogic Offline
Fresh Scripter

Registered: 2002-05-03
Posts: 6
Loc: Jersey
quote:
I got it to recognize one group. How do I get it to notice multiple groups? Thanks for the help.
If you mean that it's recognizing the first group and nothing after it, you need to make sure there is an ENDIF after every IF statement and before the next IF. Otherwise it will only look at the second IF statement if the first IF was true.

This was a good example:

code:
IF INGROUP ("Drafting") use n: "\\cluster1\drafting" endif

IF INGROUP ("Domain Admins", 1) use x: "\\cluster1\mis" endif

IF INGROUP ("Quickpen") use q: "\\cluster1\quickpen" endif

Without the ENDIF, the second IF is only looked at if the first IF is true.... if it helps, look at it like this, first with ENDIF:

code:
IF INGROUP ("Drafting")
use n: "\\cluster1\drafting"
endif

IF INGROUP ("Domain Admins", 1)
use x: "\\cluster1\mis"
endif

IF INGROUP ("Quickpen")
use q: "\\cluster1\quickpen"
endif

as opposed to without ENDIF:
code:
IF INGROUP ("Drafting")
use n: "\\cluster1\drafting"
IF INGROUP ("Domain Admins", 1)
use x: "\\cluster1\mis"
IF INGROUP ("Quickpen")
use q: "\\cluster1\quickpen"

Just a visual representation of it, really.. but you get the idea.

[ 12 June 2002, 23:31: Message edited by: FollowThisLogic ]

Top
#23069 - 2002-06-13 08:46 PM Re: If InGroup (how does it work? how to handle multiple groups?)
arshepp Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 41
Loc: California
You can do the EndIf command on the same line as the IF?
Top
#23070 - 2002-06-13 08:50 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
KiXtart is a freeform scripting language. The commands are separated/interpretted by whitespace.

if $a=1 $Z=$Z+1 endif

is the same as:
code:
if

$a=1
$z=$z+1
endif



[ 13 June 2002, 20:53: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23071 - 2002-06-13 09:21 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Ho (may I call you Ho ?)

Just got back from a round of KixGolf and picked this out of the 9th hOLE cup:

if$a=1$Z=$Z+10endif

-Shawn

I guess thats not the greatest coding style though, eh ? [Frown] + didn't shave any strokes off that puppy either

{edit}

Oops - oh crap - I forgot that Howard is the Moderator now - better watch my P&Q's [Wink]

[ 13 June 2002, 21:28: Message edited by: Shawn ]

Top
#23072 - 2002-06-13 09:29 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Watch out - I'll zap those nasty posts [Cool]

I don't know if my name is a valid KixGolf subject. I won't exist in two more posts. [Wink]

[ 13 June 2002, 21:30: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23073 - 2002-06-13 10:05 PM Re: If InGroup (how does it work? how to handle multiple groups?)
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Shawn,

I'm not shure that Howard appriciates being associated with a fairy tale [Wink]

Hint: 'And off to work we go'

-Erik

Top
#23074 - 2002-06-13 10:09 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
When my fingers get lazy I just go with HB. [Big Grin]

Hope you don't mind, Howard. At least I don't call you Richard. [Wink]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#23075 - 2002-06-13 10:11 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Erik,
Around here it's...

I owe, I owe, it's off to work I go... [Big Grin]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#23076 - 2002-06-13 10:16 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I grew up with "How" and "HB" but I answer to almost anything that isn't too derogatory.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23077 - 2002-06-13 10:43 PM Re: If InGroup (how does it work? how to handle multiple groups?)
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
First price to Les for the frenc(h) translation !

In this KiXed golf competition

-Erik

Top
#23078 - 2002-06-14 08:57 PM Re: If InGroup (how does it work? how to handle multiple groups?)
Troy Edwards Offline
Fresh Scripter

Registered: 2002-06-12
Posts: 23
Loc: Dallas, TX
Works good on Windows 2000, and NT systems, but for some reason it's not mapping on the Win9X systems? Any advice?
_________________________
Troy Edwards IS Manager Brandt Engineering Co.

Top
Page 1 of 2 12>


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

Who's Online
1 registered (Allen) and 913 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.131 seconds in which 0.011 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