For $NIC = 0 to 5
;Split the IP into seperate octets.
$ip = Split(EnumIPInfo($NIC, 0), ".")
;Remove any leading spaces. Just in case there are any.
For $i = 0 to UBound($ip)
$ip[$i] = Trim($ip[$i])
Next
Select
;Do stuff if 3rd octet is 32, 33, 34 or 35.
Case $ip[2] = "32" Or $ip[2] = "33" Or $ip[2] = "34" Or $ip[2] = "35"
$loc = "sch"
Call "sch.kix"
;Do stuff if 3rd octet is 40, 41, 42 or 43.
Case $ip[2] = "40" Or $ip[2] = "41" Or $ip[2] = "42" Or $ip[2] = "43"
$loc = "nam"
Call "nam.kix"
;Do stuff if 3rd octet is 44, 45, 46 or 47.
Case $ip[2] = "44" Or $ip[2] = "45" Or $ip[2] = "46" Or $ip[2] = "47"
$loc = "gut"
Call "gut.kix"
;Do stuff if no case is true.
Case 1
? "Unable to find matching third octet. Please contact IT."
? "IP: " + EnumIPInfo($NIC, 0)
? "Third octet: " + $ip[2]
EndSelect
Next
:End
Exit