You can get an information about pressed keys, clicked mouse buttons or stylus, and react on its actions as you need How?
Simple example:
Debug dbg;
DebugLog log = dbg.log();
void main() {
log.clear();
for( int i = 0; i < 1000; i++ ) {
float x = GetMouseX();
float y = GetMouseY();
log += "mouse coordinate " + x + " " + y;
Wait( 50 );
}
}
You can always check what's been printed to a log file choose "Scripts / View Execution Log".
Also check these functions:
DEPRECATED float GetMouseX()
DEPRECATED float GetMouseY()
DEPRECATED float GetPressure()
DEPRECATED bool LMBPressed()
DEPRECATED bool RMBPressed()
DEPRECATED bool MMBPressed();
DEPRECATED float GetVisiblePenRadius();
DEPRECATED void StartStroke(float x,float y,float Pressure)
DEPRECATED void DrawStrokeTo(float x,float y,float Pressure)
DEPRECATED void EndStroke()
DEPRECATED bool ScreenRayPicksObject(float x,float y)
DEPRECATED bool WasRecentlyPressed(string &in ID,float Time);
DEPRECATED bool WasRecentlyRMBPressed(string &in ID,float Time);
DEPRECATED bool IsInTool(string &in ToolID);
DEPRECATED string GetCurrentToolID ();
DEPRECATED float GetTimeSinceStart();