|
This what I am going to do. Your comments will be appreciated. $String1=” a,b,c,d,e,f,g,h,I,j” $String2=”k,l,m,n,o,p,q,r,s,t” $String3=”u,v,w,x,y,z” Following is example for the INI file where login script read from it to extract the employee badge# and a specific file name to be used latter in coping this file on the employee desktop during the login process.
[BUGAYORC] BadgNum=534241 FileOpen=Bugayong, Rodolfo 534241 [CHURCHMX] BadgNum=165340 FileOpen=Churchill, Michael 165340 [DELACRJV] BadgNum=538147 FileOpen=Dela Cruz, Javier 538147
I will read from the main TXT file which includes all the 800 employee’s data (badge# and file name) and which I use to create the INI. $q = open (1,"@curdir\Empls_Data.txt") DO $Read1=readline(1) Then the data will be sent to 3 ini files (instead of only one) based on the first character in the user id. $Userid=Substr($Read1,1,6) $Read2=Substr("$Userid ",1,1) IF instr("$string1","$Read2") $Writ=WriteProfileString("@curdir\Emply_1.ini","$Userid ","BadgNum",$Bagm + all other read data) ENDIF IF instr("$string2","$Read2") $Writ=WriteProfileString("@curdir\Emply_2.ini","$Userid ","BadgNum",$Bagm + all other read data) ENDIF (of course I can use case here) And so on With this way the 800 names will be distributed over 3 ini files instead of 1 file and In the login script user will be connected to one of these 3 files based on his login id first character. Thank you. [ 15. July 2003, 06:42: Message edited by: attiahia ]
|