title: Using mouse events in vbscript, how to declare routines
body: <p>I'm trying to translate a vba macro into vbscripting. That macro works when executing it from Excel VB but it uses nothing from Excel.
  When I convert</p>
  <pre><code>Private Declare PtrSafe Function GetCursorPos Lib &quot;user32.dll&quot; ( _
   ByRef lpPoint As POINTAPI) As Long
  </code></pre>
  <p>into</p>
  <pre><code>Private Declare Function GetCursorPos Lib &quot;user32.dll&quot; ( _
   ByRef lpPoint)
  </code></pre>
  <p>I get an error: <code>wsf(15, 18) Error de compilación de Microsoft VBScript: Se esperaba un final de instrucción</code> (I'm working in spanish environment)</p>
  <p>(15, 18) points to</p>
  <pre><code>Function GetCursorPos Lib &quot;user32.dll&quot; ( _
   ByRef lpPoint)
  </code></pre>
  <p>Is it possible to use mouse events in Vbscripting? If yes, how ought I to do it?</p>