scripting@wanadoo.nl




p2pause()

http://www.scriptlogic.com/kixtart/FunctionLibrary_FunctionList.aspx


actual FunctionLibrary list on 'Scriptlogic' site printer-friendly mirror of UDF topic on 'scripting@wanadoo.nl' site close
28 July 2003 p2pause()
AuthorOlaf Gradin
Action Press "P" to pause, "SPACE" to quit...
Syntaxp2pause (seconds) 
Parameters
  • seconds (Required / Integer) the amount of seconds to wait before resume or pause script execution. 
  • RemarksVery easy, but very helpful when catching messages within logon scripts. 
    Returnsnone 
    DependenciesNone. 
    Examples
    $p2pause(6)
    
    Press "P" to pause, "SPACE" to exit, or wait...
     - Paused.  (Press any key to to quit.)
     - key pressed; exiting...
    
    "SPACE" pressed; exiting...
    
     
    Source
    FUNCTION p2pause ($sec) ; Press "p" to pause (case-insensitive)
      IF $sec > 0
        FOR $x = 1 TO $sec
          SLEEP 1
          IF KbHit()
            GET $y
            SELECT
            CASE ($y = "p" OR $y = "P")
              FLUSHKB
              ? "Paused.  (Press any key to to quit.)"
              FOR $n = 1 TO 600
                SLEEP 1
                IF KbHit()
                  FLUSHKB
                  ? "key pressed; exiting..."
                  QUIT
                ENDIF
              NEXT
            CASE (Asc($y) = 32)
              FLUSHKB
              ? "SPACE pressed; exiting..."
              EXIT 0
            ENDSELECT
          ENDIF
        NEXT
      ENDIF
      FLUSHKB
    ENDFUNCTION ; - p2pause -
     
      original source of UDF topic. show actual FunctionLibrary list on Scriptlogic site close top
              printer-friendly mirror of UDF topic on scripting@wanadoo.nl site  




    Copyright © 2003 www.scriptlogic.com & scripting@wanadoo.nl - last updated on 15 October 2003


    Site Meter