Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > SCRIPTNG (TECHNET) > basic vbscript help needed
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 13th April 12:06
mr scott millar
External User
 
Posts: 1
Default basic vbscript help needed



hope some one can answer these questions.

I'm writting a script in vb to get a list of IP addresses.
But when i run the script the list comes up on the screen but i can not
scroll up in the windwos cmd window. So i need to put a counter into my
script and pause every 6 ip address so i can view them.

here is the script

Set objFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")

objFarm.Initialize(1)
counter1=1
For Each objSession In objFarm.Sessions


WScript.Echo "User name : " & objSession.UserName

WScript.Echo "IP Address: " & objSession.ClientAddress

WScript.Echo "------------------------------------"

counter1=counter1+1

if counter1 = *******
*******press any key, wait for user to press a key
end if

Next

WScript.Echo "Current users logged on at " & Time


1)I'm getting stuck at the if statement it must be if the counter is a whole
number when devided by 6.

2)If its true then i need to pause the program and wait for a user key
stroke "perss any key" not sure how to put this into vbscript.
  Reply With Quote


  sponsored links


2 13th April 12:06
michael harris \(mvp\)
External User
 
Posts: 1
Default basic vbscript help needed



'Look up the do***entation of the mod (modulus) operator...

if counter1 mod 6 = 0 then
'...pause by reading and ignoring a line from the user
wscript.echo "***** Press ENTER to continue *******
wscript.stdin.readline end if

wscript.echo "***** Press ENTER to continue ******* wscript.stdin.readline

--
Michael Harris
Microsoft MVP Scripting
  Reply With Quote
3 13th April 12:06
mr scott millar
External User
 
Posts: 1
Default basic vbscript help needed


thanks
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666