Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Variable

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,60181
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Variable
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Variable - 5/14/2008 12:28:36 AM   
  birger

 

Posts: 5
Score: 0
Joined: 2/3/2006
Status: offline
Hello
This is probably a simple question.
I've got a variable called "test" in my login script. The "test" variable gets the client ip-adress.
The problem is when a user logs on a computer with a Ip=192.168.100.5 the "test" variable gets the value 0.5
I would like that the value on my "test" variable to be shown as 005 or 5.
I'm using this lines in my script.

test=UCase(Right(KlientIP,3))
WScript.Echo test

Thanks in advance /Birger (Sweden)
 
 
Post #: 1
 
 RE: Variable - 5/14/2008 12:32:47 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
So you just want the last octet of the ip address?

test = Split(KlientIP, ".")(3)

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to birger)
 
 
Post #: 2
 
 RE: Variable - 5/14/2008 1:38:16 AM   
  birger

 

Posts: 5
Score: 0
Joined: 2/3/2006
Status: offline
Many thanks to you and this forum. It worked great.

/Birger

(in reply to birger)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Variable Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts