setMousePosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.00


|1.00|= Game version
|game2= arma2
____________________________________________________________________________________________
|version2= 1.00


| Moves mouse pointer to specified position on the screen. '''x''' and '''y''' could be any number, but will be clipped so mouse never leaves the screen area. |DESCRIPTION=
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| '''setMousePosition''' [x, y] |SYNTAX=
|game4= tkoh
|version4= 1.00


|p1= [x, y]: [[Array]] |PARAMETER1=
|game5= arma3
|p2= x: [[Number]] - x in screen coordinates |PARAMETER1=
|version5= 0.50
|p3= y: [[Number]] - y in screen coordinates|PARAMETER1=


| [[Nothing]] |RETURNVALUE=
|gr1= GUI Control - Positioning
____________________________________________________________________________________________
 
|x1= <code>[[setMousePosition]] [0.5, 0.5];</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[getMousePosition]], [[ctrlMapCursor]], [[reversedMouseY]] |SEEALSO=
|descr= Moves mouse pointer to specified position on the screen. '''x''' and '''y''' could be any number, but will be clipped so mouse never leaves the screen area.


}}
|s1= [[setMousePosition]] [x, y]
 
|p1= x: [[Number]] - x in screen coordinates
 
|p2= y: [[Number]] - y in screen coordinates


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>setMousePosition [0.5, 0.5];</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[getMousePosition]] [[ctrlMapCursor]] [[reversedMouseY]]
[[Category:Scripting Commands|SETMOUSEPOSITION]]
}}
[[Category:Scripting Commands OFP Elite |SETMOUSEPOSITION]]
[[Category:Scripting Commands ArmA|SETMOUSEPOSITION]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Revision as of 11:24, 13 May 2022

Hover & click on the images for description

Description

Description:
Moves mouse pointer to specified position on the screen. x and y could be any number, but will be clipped so mouse never leaves the screen area.
Groups:
GUI Control - Positioning

Syntax

Syntax:
setMousePosition [x, y]
Parameters:
x: Number - x in screen coordinates
y: Number - y in screen coordinates
Return Value:
Nothing

Examples

Example 1:
setMousePosition [0.5, 0.5];

Additional Information

See also:
getMousePosition ctrlMapCursor reversedMouseY

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note