Re: basic vbscript help needed
From: MR SCOTT MILLAR (1_at_1.com)
Date: 02/13/05
- Previous message: Michael Harris \(MVP\): "Re: basic vbscript help needed"
- In reply to: Michael Harris \(MVP\): "Re: basic vbscript help needed"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 13 Feb 2005 12:40:23 -0000
thanks :)
"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
news:eV$WFZKEFHA.3928@TK2MSFTNGP15.phx.gbl...
> 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: Michael Harris \(MVP\): "Re: basic vbscript help needed"
- In reply to: Michael Harris \(MVP\): "Re: basic vbscript help needed"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|