0

I learned recently I could use batch files and JavaScript to send to keyboard presses and movements to the interface I am currently using. (See this question for one of the problems I solved using the information from this question.)

However, I am not an experienced JavaScript or any other language user yet I am proficient in writing the general basic language. While I know there are many JavaScripts, heck even other languages, that allow you to create mouse movement and clicks (see here for one possible way of doing this), I figured that there could be some way of integrating batch files with the other form of programming language types for simply creating mouse interaction, much like the one person in link 2 integrated the JavaScripts and batch files in order to create key presses.

I need to know how i can control the mouse from a batch file using a javascript if needed. (Most likely to be needed as no batch file command has jurisdiction over either mouse or keyboard directly.)

Community
  • 1
  • 1
Jouster500
  • 762
  • 12
  • 25
  • What, exactly, is your question? I see that you have a good idea of where to start, but what exactly is your goal? What have you tried? Why did that not work? – Sumner Evans Apr 23 '15 at 03:41
  • I will fix the title a bit more so it reads a bit more clearly. If you read what i already wrote, you would know that i know nothing of javascript. All i know is how to use a javascript in batch files so i cant necessairily try anything until i have the knowledge to do so, which is what i am asking for. – Jouster500 Apr 23 '15 at 13:03
  • 1
    A console script can't control mouse movement. JavaScript can simulate clicks on DOM elements and within a web browser, but such feats aren't really accessible to the Windows Scripting Host. Your best bet would be to switch to AutoIt. – rojo Apr 23 '15 at 15:56
  • Yes but there must be some code that dictates the position and speed of the mouse key that is shown on the display. I don't care what language it is in, or if its just assembly language whatever. The program or executable that dictates mouse movement and clicks exists some where in the hardware. – Jouster500 Apr 23 '15 at 16:36
  • @Jouster500. You will need something ***much*** lower level than either JS or batch scripts to do this. – Sumner Evans Apr 23 '15 at 21:48
  • @jsve. Well could you tell me what i need to know so i can appropriately change the tags and question to be better suited to somebody actually answering it? =\ – Jouster500 Apr 24 '15 at 13:02
  • looking over this a few months, lower how? like lower internally or lower in intellect needed to run it? – Jouster500 Jun 30 '15 at 17:16

1 Answers1

0

Theres a configuration out on my windows 7 called mouse keys. This allows the mouse to be controlled by the keyboard, of which i can already easily control using the JScript to press keys. Heres the official link...

http://windows.microsoft.com/en-us/windows7/use-mouse-keys-to-move-the-mouse-pointer

Jouster500
  • 762
  • 12
  • 25
  • interesting enough, the difficult part comes around especially with users who have a number pad. Batch scripts cant exactly tell which number to press so it defaults to the standard 9 above the keyboard. Mouse keys used to this end only work on keyboards that DO NOT have the number pad. Ive found this to be a much nicer solution as by switching the useless number lock key, one can go from mouse keys to standard keys in no time at all, and i bet i can manipulate mouse movement to this end. – Jouster500 Jul 28 '15 at 12:59