#24585 - 2002-07-09 05:10 PM
Re: If InGroup not working
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
Try following script and return the output of file %tmp%\kixdebug.txt to the board. At the begin a messagebox will be presented.
code:
CLS COLOR C+/N AT (1,1) " "
$_debug_file="kixdebug.txt" ; - %tmp% directory - ; IF (len($_debug_file) <> 0) IF (substr(ExpandEnvironmentVars("%tmp%"),len(ExpandEnvironmentVars("%tmp%")),1) = "\") $_debug_file=ExpandEnvironmentVars("%tmp%")+$_debug_file ELSE $_debug_file=ExpandEnvironmentVars("%tmp%")+"\"+$_debug_file ENDIF ENDIF ;$_debug_file="c:\kixdebug.txt" $_debug_file=LCASE($_debug_file) IF RedirectOutput($_debug_file) ENDIF
? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.13e script starting." ? "-" ? "-curdir: "+LCASE(@curdir) ? "-scriptdir: "+LCASE(@scriptdir) IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) ? "-scriptname: "+LCASE(@scriptname) ENDIF ? "-startdir: "+LCASE(@startdir) ? "-" ? "-userid: "+LCASE(@userid)+"/"+LCASE(@wuserid) ? "-user priv: "+LCASE(@priv) IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0) ? "-version: inwin="+@inwin+"/dos="+@dos"/productsuite="+@productsuite+"/producttype="+@producttype"/csd="+LTRIM(RTRIM(@csd)) ELSE ? "-version: inwin="+@inwin+"/dos="+@dos ENDIF
DIM $_debug_name $_debug_name="" IF (instr("-4.xx-","-"+substr(@kix,1,2)+"xx-") <> 0) $_debug_name=@msecs SELECT CASE (len($_debug_name) = 1) $_debug_name="00"+$_debug_name CASE (len($_debug_name) = 2) $_debug_name="0"+$_debug_name ENDSELECT $_debug_name="."+$_debug_name IF srnd(@msecs) ENDIF ENDIF $_debug_name=substr(@date,1,4)+substr(@date,6,2)+substr(@date,9,2)+"_"+substr(@time,1,2)+substr(@time,4,2)+substr(@time,7,2)+$_debug_name+"_"+rnd(32767) IF (len($_debug_name) < 25) $_debug_name=substr($_debug_name+" ",1,25) ENDIF IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) IF (len(@scriptname) < 12) $_debug_name=$_debug_name+" "+LCASE(substr(@scriptname+" ",1,12)) ELSE $_debug_name=$_debug_name+" "+LCASE(@scriptname) ENDIF ENDIF ? "-debug file: "+$_debug_file ? "-debug name: "+$_debug_name ? "-" ?"----- start-"+@time+"-"+$_debug_name+"- @error @serror"? IF (MessageBox("kixtart @kix starting","kixtart info",0,5) <> 0) ENDIF ?"- 1-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Ingroup("beth&les") <> 0) ?"- 2-"+@time+"-"+$_debug_name+"- @error @serror"? ? "user @userid is member of BETH&LES" ?"- 3-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 4-"+@time+"-"+$_debug_name+"- @error @serror"? ? "user no mber of" ?"- 5-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 6-"+@time+"-"+$_debug_name+"- @error @serror"? ?"- 7-"+@time+"-"+$_debug_name+"- @error @serror"? USE LIST ?"- 8-"+@time+"-"+$_debug_name+"- @error @serror"? IF (Ingroup("beth&les") <> 0) ?"- 9-"+@time+"-"+$_debug_name+"- @error @serror"? USE i: "\\russet\beth&les" ?"- 10-"+@time+"-"+$_debug_name+"- @error @serror"? IF (@error <> 0) THEN ?"- 11-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Warning KIX-USE: error @error (@serror)" ?"- 12-"+@time+"-"+$_debug_name+"- @error @serror"? ELSE ?"- 13-"+@time+"-"+$_debug_name+"- @error @serror"? ? "Informative KIX-USE: no error" ?"- 14-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF ?"- 15-"+@time+"-"+$_debug_name+"- @error @serror"? ENDIF
?"------- end-"+@time+"-"+$_debug_name+"- @error @serror"? ? "-" ? "-"+LCASE(@day)+" "+@date+" "+@time+"- kixtart "+@kix+"/3.13e script ending." ? "-" IF (instr("-4.1x-","-"+substr(@kix,1,3)+"x-") <> 0) ? "-"+@cpu+" ("+@mhz+" Mhz, memory "+MemorySize()+" MB)" ENDIF ? "-" IF RedirectOutput("CON") ENDIF COLOR C+/N ? ? "debugging information "+CHR(34)+$_debug_file+CHR(34) IF RedirectOutput($_debug_file) ENDIF
greetings.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
2 registered
(Allen, ShaneEP)
and 480 anonymous users online.
|
|
|