tim_faron
11 years agoContributor
Alternative to Win32API commands in Script Extension
Is there an alternative to using the following code in a script extension: Sys.Desktop.MouseDown(Win32API.VK_LBUTTON, X, Y); Sys.Desktop.MouseUp(Win32API.VK_LBUTTON, X, Y); W...
- 11 years agoHi Tim,
The Win32API object isn't available in script extensions, so you need to explicitly define the constant:
var VK_LBUTTON = 1;
...
Sys.Desktop.MouseDown(VK_LBUTTON, X, Y);
Sys.Desktop.MouseUp(VK_LBUTTON, X, Y);
You can find the VK_* constant values in this MSDN article:
Virtual-Key Codes