WaitALLinput
WaitALLinput MouseMoveFlag, ButtonFlag, KeyFlag
 
Parameters:

    MouseMoveFlag = Flag to wait for mouse movements (0= ingore, 1 = wait)
    ButtonFlag = Flag to wait for mouse button press
    KeyFlag = Flag to wait for any input from the keyboard (0=ignore, 1 = wait)
Returns: NONE
 

      WaitAllInput will wait until the user either moves the mouse, presses a selected mouse button or hits a key.


[ Move Mouse Flags ]

      0= Don't accept Mouse Movement to end Wait
      1= Accept any mouse movement to end the wait



[ Button Flags ]

      0= Don't wait for mouse button
      1= Wait for the LEFT Mouse button to be pressed
      2= Wait for the RIGHT Mouse button to be pressed
      3= Wait for either the LEFT or RIGHT buttons to be pressed
      4= Wait for the MIDDLE/WHEEL button to be pressed
      5= Wait for either the LEFT or MIDDLE/WHEEL buttons to be pressed
      6= Wait for either the RIGHT & MIDDLE/WHEEL buttons to be pressed
      7= Wait for ANY mouse buttons to be pressed.


[ Key Flags ]

      0= Don't accept Key Press to end Wait
      1= Accept any Key press to end the wait




FACTS:


      * None



Mini Tutorial:


      This tutorials show how the WaitAllInput command can be used to wait for various types of user input before it continues.


  
  
; Show a message and WAIT for the MOUSE to be MOVED
  Print "Move the Mouse or Press Key to Continue"
  Sync
  WaitAllInput 1,0,1
  
  
; Show a message and WAIT for the LEFT MOUSE button
  Print "Press Mouse LEFT Button (1) to Continue"
  Sync
  WaitAllInput 0,1,0
  
; Show a message and WAIT for the RIGHT MOUSE button
  Print "Press Mouse RIGHT Button (2) to Continue"
  Sync
  WaitAllInput 0,2,0
  
; Show a message and WAIT for the MIDDLE MOUSE button
  Print "Press Mouse MIDDLE Button (4) to Continue"
  Sync
  WaitAllInput 0,4,0
  
  
; Force the program to wait until there is No INput
  WaitNoInput
  
  
  
; Show a message and WAIT for EITHER a mouse move or
; button to be pressed
  Print "Move the Mouse,press mouse button pr hit a key to Continue"
  Sync
  WaitAllInput 1,%111,1
  
  
  
  
; Display the Screen and wait for the user to press a key
  Print " Done complete - press key to end"
  Sync
  WaitKey
  



This example would output.

  
  Move the Mouse Or Press Key To Continue
  Press Mouse LEFT Button (1To Continue
  Press Mouse RIGHT Button (2To Continue
  Press Mouse MIDDLE Button (4To Continue
  Move the Mouse,press Mouse button pr hit a key To Continue
  Done complete - press key To End
  


 
Related Info: Timer | Wait | Waitkey | WaitMouse | WaitNOinput | WaitNoKey :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com