Page 1 of 1 1
Topic Options
#197973 - 2010-03-04 07:38 PM If Ingroup() and Not Ingroup()
SirWilliam Offline
Just in Town

Registered: 2010-03-04
Posts: 1
Loc: Texas
I'm executing a batch file based on group membership. Is this legit?

 Code:
IF (INGROUP("FTWorth") AND (NOT INGROUP ("LITSUPP") OR NOT INGROUP("FORT WORTH PROXY")))
    
    		SHELL "CMD /C G:\A\batchfiles\ProxyFW\ProxyFW.bat"

      ENDIF

Top
#197976 - 2010-03-04 10:19 PM Re: If Ingroup() and Not Ingroup() [Re: SirWilliam]
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
IF ingroup('ftworth') and not ingroup('litsupp','fort worth proxy')

but what you have should work as well
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#197978 - 2010-03-04 10:34 PM Re: If Ingroup() and Not Ingroup() [Re: Radimus]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Code wise you having nothing wrong... but that is complicated to read. I like to be able to read it without having to decipher it. Sometimes I will do everything possible to not use NOT.

Maybe like? (untested)

 Code:
IF (INGROUP("FTWorth")
  if INGROUP("LITSUPP") or INGROUP("FORT WORTH PROXY")
    ;do nothing
  else
    SHELL "CMD /C G:\A\batchfiles\ProxyFW\ProxyFW.bat"
  endif
endif


Edited by Allen (2010-03-05 01:01 AM)
_________________________
(... better days ahead)

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 583 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.054 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

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