View Single Post
  #14  
Old 22nd Aug 03, 05:25 PM
MaxPayne MaxPayne is offline
Member
 
Join Date: Oct 2001
Location: Sweden
Posts: 35
MaxPayne
I use VBS alot, as it is the same language as ASP I feel very comfortable with it. Like running a task at regular intervals, I just script what I need to be done and add the VBS to the scheduler. Or problem solving things, like a friend wanted a script that accepts an IP range and outputs the low- and highbound IP addy. So I wrote this:

inIP = "172.16.0-10.0-255" 'Just an example, edit or use a msgbox
IP = Split(inIP, ".")

a = Split(IP(0), "-")
b = Split(IP(1), "-")
c = Split(IP(2), "-")
d = Split(IP(3), "-")

loIP = a(LBound(a)) & "." & _
b(LBound( b )) & "." & _
c(LBound( c )) & "." & _
d(LBound( d ))

hiIP = a(UBound(a)) & "." & _
b(UBound( b )) & "." & _
c(UBound( c )) & "." & _
d(UBound( d ))

MsgBox "Input:" & vbCrLf & _
inIP & vbCrLf & vbCrLf & _
"Output:" & vbCrlF & _
loIP & " - " & hiIP


Oooops, The smileys killed that message. Fixed it.
Reply With Quote