Re: basic vbscript help needed

From: Michael Harris \(MVP\) ("Michael)
Date: 02/12/05

  • Next message: MR SCOTT MILLAR: "Re: basic vbscript help needed"
    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 
    

  • Next message: MR SCOTT MILLAR: "Re: basic vbscript help needed"

    Relevant Pages

    • Re: Mouse support on 4.1 on Windows fails
      ... <pause mouse keypress> ... A small window pops up, but there are no OK of Cancel ... The following script snippet works on gnuplot 4.0 on a WinPC. ... wait for a mouse click (better a keypress such as ...
      (comp.graphics.apps.gnuplot)
    • Re: scripted search
      ... the final script will take search terms from ... avoid the pause. ... Where do you see a pause option in Perform Find? ...
      (comp.databases.filemaker)
    • Re: scripted search
      ... the final script will take search terms from ... avoid the pause. ... Where do you see a pause option in Perform Find? ...
      (comp.databases.filemaker)
    • Re: "Continue" button to come out of preview needs to be clicked twice. Fix?
      ... I set up a script to ... >pause twice, so that's why you need to click Continue twice: ... FMP is so ...
      (comp.databases.filemaker)
    • Re: How to enforce the "more" command
      ... I wondered if there is any other command to pause the output. ... I have a script, test.sh, which contains ... anything to test.sh as it doesn't read its stdin. ...
      (comp.unix.shell)