1

I'm trying to write a script in VBScript that executes a series of events and one of them includes a left mouse click and release.

I know that I can't use VBScript in order to do the left mouse click and I can't install any software. I am only able to use Notepad in order to do all the code writing. I do have Microsoft word as well but I don't know if you can use that to write any code.

Is there a way for me to write some simple code in another language that allows me to left mouse click and release? I'm then planning on importing this code into my VBScript and continue on from there.

What I have so far:

Option Explicit
Dim Excel, x, y
Dim s

Set Excel = WScript.CreateObject("Excel.Application")

x = "10"
y = "10"
Excel.ExecuteExcel4Macro ( _
    "CALL(""user32"",""SetCursorPos"",""JJJ""," & x & "," & y & ")")


WScript.Sleep (1000)


WScript.Sleep (1000)
WScript.Echo "Stop Script, Test test"

Thanks for reading!

  • left mouse click on what? – mikeyq6 Mar 16 '16 at 13:01
  • Left mouseclick on anything really. But it has to be a left mouse click. To give an example; select the Recycle Bin on the desktop, though using the left mouse click. Another example would be that a webpage requires you to select a date with the mouse. (you can't type the date). You can only select the date by pressing the Left mouse button. So the question is how I can simulate a left mouse button press. –  Mar 17 '16 at 13:57

0 Answers0