If your lookup file is in INI format as you outlined above, then I was thinking of something like this:
code:
; Script begins
cls
COLOR w+/b
; Ta bort startbara filer
SHELL "a:\COMMAND.COM /C del a:\net\net.exe"
SHELL "a:\COMMAND.COM /C del a:\autoexec.bat >nul"
flushkb
? "My Macaddress = @address"
sleep 10
IF Open( 3 , "T:\movex.ini" ) = 0
$apps = ""
$fnd = 0
$x = ReadLine( 3 )
WHILE (@ERROR = 0 and $fnd=0)
If (INSTR( $x , "movex" )>0)
$apps="movex"
Else
If (INSTR( $x , "Internet Explorer" )>0)
$apps="IE"
Else
If (INSTR( $x , "Desktop" )>0)
$apps="Desktop"
Endif
Endif
Endif
IF $x = @address
$fnd=1
ENDIF
$x = ReadLine( 3 )
LOOP
Close ( 3 )
If ($apps="")
? "Error - Readings Apps file - No Apps Sections found"
Else
If ($fnd=0)
? "Error - Address not found in list"
Endif
Endif
Else
? "Error - App file not opened, error code : [" + @ERROR + "]"
ENDIF
If ($fnd>0 and $apps<>"")
shell "t:\runapp.bat " + $apps
Endif
Exit
Please note, I haven't tested this script & I haven't used version 2.33 for a while so it could have some bugs.
[ 10. April 2003, 20:19: Message edited by: Jack Lothian ]
_________________________
Jack