Re: basic vbscript help needed
From: Michael Harris \(MVP\) ("Michael)
Date: 02/12/05
- Previous message: MR SCOTT MILLAR: "basic vbscript help needed"
- In reply to: MR SCOTT MILLAR: "basic vbscript help needed"
- Next in thread: MR SCOTT MILLAR: "Re: basic vbscript help needed"
- Reply: MR SCOTT MILLAR: "Re: basic vbscript help needed"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 11 Feb 2005 17:58:05 -0800
MR SCOTT MILLAR wrote:
> hope some one can answer these questions.
response inline...
>
> 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
>
'Look up the documentation 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
>
>
> Next
>
> WScript.Echo "Current users logged on at " & Time
>
wscript.echo "***** Press ENTER to continue *******
wscript.stdin.readline
>
> 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.
-- Michael Harris Microsoft MVP Scripting
- Previous message: MR SCOTT MILLAR: "basic vbscript help needed"
- In reply to: MR SCOTT MILLAR: "basic vbscript help needed"
- Next in thread: MR SCOTT MILLAR: "Re: basic vbscript help needed"
- Reply: MR SCOTT MILLAR: "Re: basic vbscript help needed"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|