Mobianhero
Mobianhero

Reputation: 279

Can a separate mouse object be used for AutoIt scripts than the actual cursor itself

I'm trying to run multiple instances of the same script in AutoIt which requires emulations of mouse clicks and key strokes. My script works just fine when I run a single instance of it. The problem is I need to run different instances of it for each of my customers at once off of my desktop. Is there a way you can create different mouse and keyboard objects for every one of my scripts? I'm new to using AutoIt so forgive me if this is such a blunt question.

Upvotes: 1

Views: 1106

Answers (1)

Matt
Matt

Reputation: 7160

Not directly. However, there is several approaches you can look at:

  1. Provided no mouse moves are required, rewrite the code to use ControlClick and ControlSend. These will allow multiple scripts to automate at the same time as they don't use the mouse.
  2. If you know the windows api, and you are automating different windows, then take a look at the windows desktop api. These will allow you to run programs on a different desktop, and so automate in the background.

The first approach is always recommended, but not always possible.

Upvotes: 2

Related Questions