{"name":"setMousePosition","operator":null,"title":"setMousePosition","type":"command","url":"https://community.bistudio.com/wiki/setMousePosition","revid":340820,"updated":"2023-05-07T11:05:54Z","groups":["GUI Control - Positioning"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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.","syntaxes":[{"syntax":"setMousePosition [x, y]","since":null,"effect":null,"exec":null,"params":[{"name":"x","type":"Number","optional":false,"default":null,"description":"x in screen coordinates","types":["Number"],"since":null,"text":"x: Number - x in screen coordinates"},{"name":"y","type":"Number","optional":false,"default":null,"description":"y in screen coordinates","types":["Number"],"since":null,"text":"y: Number - y in screen coordinates"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"[x, y]","types":["Array"]}}],"examples":[{"text":"```sqf\nsetMousePosition [0.5, 0.5];\n```","code":["setMousePosition [0.5, 0.5];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getMousePosition","ctrlSetMousePosition","ctrlMousePosition","ctrlMapCursor","reversedMouseY"],"notes":[],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control - Positioning","Introduced with Armed Assault version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}