Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to simulate mouse and keyboard movements in a virtual machine (ie: running a macro) while still being able to work normally on my host.

Reason I ask is because I currently run these macros on my PC, but this hinders me because as long as those macros are running, I can't do anything else.

If anyone has any experience or ideas on this subject, or knows if it works with another VM software such as VirtualBox

share|improve this question
    
You should consider converting the macros to shell scripts. If they can't be easily done under Windows, try Linux. You can run your macros inside the VM and they won't interfere with the host. –  billc.cn Dec 4 '11 at 11:41
    
Why can't you simply put these macros inside your virtual machine environment and run them there? –  Mokubai Dec 4 '11 at 18:20
add comment

1 Answer

up vote 0 down vote accepted

First of all, the question: "Why don't you just try it out?" springs to mind. But anyway, this is not the Superuser spirit, and I was interested to find out myself.

So I ran an AutoHotkey script

  • in a Windows Vista guest inside VirtualBox (which does not support mouse and keyboard integration)
  • in an XP mode guest with VirtualPC by Microsoft (which does support that integration)

while making sure the keyboard focus was off. The macro worked even when I took the keyboard focus away. I could watch it work in the virtual machine.

The answer to your question is therefore "yes, probably".

I am not sure this will work under all conditions, but I don't see why it should not.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.