164
www.analogway.com
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
F.b.b.
Moving the mouse
send_ui_event("source1", "Mouse Move 800 600")
The website received the UI event as:
OnConsoleMessage: type:mousemove, x:800, y:600, ctrlKey:false
F.b.c.
Clicking the "A" key on keyboard
send_ui_event("source1", "Keyboard KeyDown Name KeyA")
send_ui_event("source1", "Keyboard KeyChar Name KeyA")
send_ui_event("source1", "Keyboard KeyUp Name KeyA")
The website received the 3 UI events as:
OnConsoleMessage: type:keydown, key:a (65), code:KeyA
OnConsoleMessage: type:keypress, key:a (65), code:KeyA
OnConsoleMessage: type:keyup, key:a (65), code:KeyA
Depending on the website. If the website is a game for instance. It may be helpful to add a sleep in between
the KeyDown and KeyUp to simulate the key being pressed down a while:
send_ui_event("source1", "Keyboard KeyDown Name ArrowLeft")
sleep 0.50
send_ui_event("source1", "Keyboard KeyUp Name ArrowLeft")
Here the ArrowLeft is left pressed down for half a second.
F.c.
API in details
Users can programmatically send events to a webpage by using the following lua command.
send_ui_event([source_name], [event_message])
The [source_name] argument is the name of the source with the webpage where events are to be sent.
The first valid name here is "source1" and the last is "source32".
The [event_message] is described below.
F.c.a.
Keyboard events
[event_message] is of format "Keyboard [event_type] Name [KeyName] [modifiers]"
where [event_type] is one of KeyDown, KeyChar, KeyUp
where [modifiers] is optional and is zero or more of CapsLock, NumLock, Shift, Ctrl, Alt, AltGr, Meta,
MouseButtonLeft, MouseButtonMiddle, MouseButtonRight
where [KeyName] is one of the following key names in the "standard 101 keyboard layout".