Difference between revisions of "ISKernel:mouse (Object Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
The data type for mouse control. The methods for this data type sends the emulation directly to the game bypassing all IS UI elements(e.g. console, user made UIs).
+
The object type for mouse control. The methods for this object type sends the emulation directly to the game bypassing all IS UI elements(e.g. console, user made UIs).
 
== Members ==
 
== Members ==
* [[DataType:string|string]] '''System''': Name of the currently active system for mouse input (DirectInput, Win32I)
+
* [[ObjectType:string|string]] '''System''': Name of the currently active system for mouse input (DirectInput, Win32I)
* [[DataType:int|int]] '''X''': Current mouse X position (horizontal)
+
* [[ObjectType:int|int]] '''X''': Current mouse X position (horizontal)
* [[DataType:int|int]] '''Y''': Current mouse Y position (vertical)
+
* [[ObjectType:int|int]] '''Y''': Current mouse Y position (vertical)
 +
* [[ObjectType:float|float]] '''Speed''': Current system mouse speed, 1.0 = 100%
 +
* [[ObjectType:int|int]] '''Acceleration''': Current system mouse acceleration setting
 +
* [[ObjectType:int|int]] '''Threshold1''': Current system mouse acceleration threshold 1
 +
* [[ObjectType:int|int]] '''Threshold2''': Current system mouse acceleration threshold 2
 +
* [[ObjectType:string|string]] '''Position''': Position of the mouse, in the form X,Y, such as 0,0 or 263,475
 +
* [[ObjectType:bool|bool]] '''Cursor''': TRUE if system cursor is visible
 +
* [[ObjectType:bool|bool]] '''BackgroundCursor''': TRUE if Inner Space is rendering the cursor (while the game is inactive)
  
 
== Methods ==
 
== Methods ==
Line 14: Line 21:
 
* '''ReleaseRight''': Releases the right mouse button
 
* '''ReleaseRight''': Releases the right mouse button
 
* '''SetPosition['''x''','''y''']: Sets the mouse position
 
* '''SetPosition['''x''','''y''']: Sets the mouse position
 +
* '''Wheel['''#''']''':
 +
* '''ShowCursor''':
 +
* '''HideCursor''':
 +
* '''SetBackgroundCursor['''bool''']''':
 +
* '''ResetSpeed''': Resets system mouse speed to 100% (Speed=1.0) -- this will cause system lag when applied
 +
* '''DisableAcceleration''': Disables system mouse acceleration -- this will cause system lag when applied
  
 
== Returns ==
 
== Returns ==
Position of the mouse, in the form X,Y, such as 0,0 or 263,475
+
Same as '''Position'''
  
 
== Examples ==
 
== Examples ==
Line 29: Line 42:
 
===Click the left mouse button===
 
===Click the left mouse button===
 
*Mouse:LeftClick
 
*Mouse:LeftClick
:Clicks the left mouse button
+
:This command clicks the left mouse button
 
===Click the right mouse button===
 
===Click the right mouse button===
 
*Mouse:RightClick
 
*Mouse:RightClick
:Clicks the right mouse button
+
:This command clicks the right mouse button
 
===Click and hold the left mouse button===
 
===Click and hold the left mouse button===
 
*Mouse:HoldLeft
 
*Mouse:HoldLeft
:Clicks and holds down the left mouse button
+
:This command clicks and holds down the left mouse button
 
===Release the left mouse button===
 
===Release the left mouse button===
 
*Mouse:ReleaseLeft
 
*Mouse:ReleaseLeft
:Releases the left mouse button
+
:This command releases the left mouse button
 
===Sets the mouse position to a given X,Y===
 
===Sets the mouse position to a given X,Y===
 
*Mouse:SetPosition[250,500]
 
*Mouse:SetPosition[250,500]
:Will move mouse pointer to the pixel at 250,500
+
:This command will move mouse pointer to the pixel at 250,500
  
 
;Sample
 
;Sample
Line 59: Line 72:
  
 
== See Also ==
 
== See Also ==
* [[LavishScript:Data Types|LavishScript Data Types]]
+
*[[LavishScript:Data Types|Data Types]]
* [[IS:Session#Data_Types|Inner Space Session Data Types]]
+
*[[IS:Kernel#Data_Types|Kernel Data Types]]
 +
 
  
 
{{DT-Stub}}
 
{{DT-Stub}}
 
[[Category:Inner Space]]
 
[[Category:Inner Space]]
[[Category:Inner Space Session]]
+
[[Category:Inner Space Kernel]]
[[Category:Inner Space Session Data Types]]
+
[[Category:Inner Space Kernel Data Types]]

Latest revision as of 01:33, 6 January 2019

Description

The object type for mouse control. The methods for this object type sends the emulation directly to the game bypassing all IS UI elements(e.g. console, user made UIs).

Members

  • string System: Name of the currently active system for mouse input (DirectInput, Win32I)
  • int X: Current mouse X position (horizontal)
  • int Y: Current mouse Y position (vertical)
  • float Speed: Current system mouse speed, 1.0 = 100%
  • int Acceleration: Current system mouse acceleration setting
  • int Threshold1: Current system mouse acceleration threshold 1
  • int Threshold2: Current system mouse acceleration threshold 2
  • string Position: Position of the mouse, in the form X,Y, such as 0,0 or 263,475
  • bool Cursor: TRUE if system cursor is visible
  • bool BackgroundCursor: TRUE if Inner Space is rendering the cursor (while the game is inactive)

Methods

  • LeftClick: Presses and immediately releases the left mouse button
  • RightClick: Presses and immediately releases the right mouse button
  • HoldLeft: Presses and holds the left mouse button
  • ReleaseLeft: Releases the left mouse button
  • HoldRight: Presses and holds the right mouse button
  • ReleaseRight: Releases the right mouse button
  • SetPosition[x,y]: Sets the mouse position
  • Wheel[#]:
  • ShowCursor:
  • HideCursor:
  • SetBackgroundCursor[bool]:
  • ResetSpeed: Resets system mouse speed to 100% (Speed=1.0) -- this will cause system lag when applied
  • DisableAcceleration: Disables system mouse acceleration -- this will cause system lag when applied

Returns

Same as Position

Examples

Display active system for mouse input

  • echo Current mouse input: ${Mouse.System}
Output
Current mouse input: Win32I

Display mouse pointers position

  • echo Mouse Pos: ${Mouse}
Output
Mouse Pos: 378,607

Click the left mouse button

  • Mouse:LeftClick
This command clicks the left mouse button

Click the right mouse button

  • Mouse:RightClick
This command clicks the right mouse button

Click and hold the left mouse button

  • Mouse:HoldLeft
This command clicks and holds down the left mouse button

Release the left mouse button

  • Mouse:ReleaseLeft
This command releases the left mouse button

Sets the mouse position to a given X,Y

  • Mouse:SetPosition[250,500]
This command will move mouse pointer to the pixel at 250,500
Sample
do
{
   Mouse:SetPosition[275,437]
   Mouse:LeftClick
   Mouse:LeftClick
   wait 5
   Mouse:SetPosition[453,437]
   Mouse:LeftClick
   Mouse:LeftClick
   wait 5
 }
while (1)

See Also