Move the mouse with vbs

0live -  
 -Shadow- -
Hi all

I want to write a VBScript that would move my mouse pointer all the way to the right of the screen so it’s no longer visible ...
so I put the following commands in my .vbs :

Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long ByVal y As Long) As Long

setcursorpos 100, 100

but I get an error line 1 character 9 (syntax error)
Could someone help me ?

thanks

1 answer

-Shadow-
 
Hello, first, you need to put a comma between "ByVal x As Long" and "ByVal y As Long".
(4 years of gap between the answers but okay...)
0