Jump to content

Blockinput() not working in VMware


 Share

Recommended Posts

I use VMWare to text stuff in XP since I'm running Windows 7, but I haven't tried any BlockInput() in the VM. Is it blocking from the host side, and if input is captured by the VM it isn't blocking it, or just in the VM its self?

You are right.. I gave too little info.

I am talking only about inside the guest.

So: Blockinput(in the VMware) doesn't block the mouse of the VMware.

Link to comment
Share on other sites

You sure about that? I just did

BlockInput(1)
Sleep(5000)
BlockInput(0)
and it blocked the input for me, except now... I think I broke it, and my mouse isn't responding at all even though the script has terminated... O.o what OS and version of VMware are you running?

We ought not to misbehave, but we should look as though we could.

Link to comment
Share on other sites

VMwarePlayer 3.0.0 build-197124 VMwaretools installed

HostOs & GuestOs: XP

In my HostOs its working perfectly.

Why are you trying to block input in a virtual machine in the first place?

Cause I am using mousemove() to automate.

And It doesn't work correctly, when I am using the mouse at the same time.

So I always used blockinput() to automate correctly.

Link to comment
Share on other sites

Weird... I use VMWare Workstation, but I started it up in the Player, and it still blocked input, restricted mouse movement, etc.

My version is also a little bit newer (3.0.0 Build 203739)

You sure it's executing the BlockInput()?

Edited by mistersquirrle

We ought not to misbehave, but we should look as though we could.

Link to comment
Share on other sites

You sure it's executing the BlockInput()?

Not sure how you mean that.

Theres not much you can do wrong in the code.

As I said in the host its working.

I am sure it has something to do with the settings.

In WMware(not the player) I have checked all 5 boxes in Preferences-->Input

also: "optimize mouse for games" is automatic.

[VMwareTools(& adv.mouse driver) installed]

Link to comment
Share on other sites

That means that either another application has already blocked the input OR your program doesn't have permission to do so.

I've already closed all unnecessary processes and autoit is running on the administrator acount.

But I just discovered, that while blockinput(1) is active I can move the mouse but not do any clicking...lol.

another interesting aspect:

When using mousemove() and only slightly moving the (real)mouse, mousemove is not performed at all.!!

Thats not the case in my host system, where mousemove() is performed even if the mouse is moved.

Edited by leonick5
Link to comment
Share on other sites

It seems for me like it works like that:

WMware is generally blocking the mouse(movement) of the guestXP.(Thats why blockinput() is returning false.

Instead its using its own mousecursor(Or the one of the Host XP), and blocking the GuestOS mouse,

and just passing the mouse-values(click) to the GuestOS-mouse.

That means if you are pressing a button, it sends this command to the GuestOS.

That also explains, if you use blockinput(), why the mouse is still moving(Its not the mouse of the GuestOS)

But after blockinput() VMware is not able to pass the click to the OS, because now not only the mousemovemt is blocked(by WMware), now also the clicking is blocked by blockinput()

That makes totally sense to me.

Just wondering why its working with mastersquirrels VM.??

Don't see any connection there to the updates??

But if you are keen to know:

All updates until 12/09

You have tested blockinput() yourself in a VM?

Edited by leonick5
Link to comment
Share on other sites

  • 4 weeks later...

Option Blockinput() works in AutoIt with Win7 only if you first use '#RequireAdmin' at first.

#RequireAdmin
BlockInput(1)
.
.
.

MsgBox(4096, "Info", "Now running with admin rights")
.
.
.

BlockInput(0)
Edited by CHRIS1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...