InputEvent()

Syntax

InputEvent(MouseX, MouseY, LeftMouseButton [, Text$, SpecialKey])
Description
Send an event to the GUI system. It is required to have ScreenWindowEvent() working.

Parameters

MouseX, MouseY The new mouse coordinate to use.
LeftMouseButton Left mouse button state. It can be one of the following values:
  0: left mouse button is released.
  1: left mouse button is pushed.
Text$ (optional) The text to use as input.
SpecialKey (optional) The special key to use as key press. It can be one of the following values:
  #PB_Key_Back
  #PB_Key_Delete
  #PB_Key_Return
  #PB_Key_Up
  #PB_Key_Down
  #PB_Key_Left
  #PB_Key_Right

Return value

None.

Example

  ;
  ; Typical code to use to send to the GUI system with actual mouse and keyboard events
  ;
  If ExamineKeyboard() And ExamineMouse()
    Input$ = KeyboardInkey()
    
    InputEvent(MouseX(), MouseY(), MouseButton(#PB_MouseButton_Left), Input$, 0)
  EndIf

See Also

ScreenWindowEvent()

Supported OS

All

<- InitScreenGadgets() - ScreenGadget Index - IsScreenGadget() ->