leonick5 Posted February 5, 2010 Share Posted February 5, 2010 I guess it has something to do with the mousedriver of VMware. So probably it would not be possible to make it work in VMware.... but if anyone knows a solution, it would be appreciated. Link to comment Share on other sites More sharing options...
mistersquirrle Posted February 5, 2010 Share Posted February 5, 2010 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? We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
leonick5 Posted February 5, 2010 Author Share Posted February 5, 2010 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 More sharing options...
mistersquirrle Posted February 5, 2010 Share Posted February 5, 2010 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 More sharing options...
Richard Robertson Posted February 5, 2010 Share Posted February 5, 2010 (edited) The mouse driver is most likely the culprit. Especially considering that VMWare has that cool "move in and out of the VM window" thing. Why are you trying to block input in a virtual machine in the first place? Edited February 5, 2010 by Richard Robertson Link to comment Share on other sites More sharing options...
leonick5 Posted February 5, 2010 Author Share Posted February 5, 2010 VMwarePlayer 3.0.0 build-197124 VMwaretools installedHostOs & GuestOs: XPIn 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 More sharing options...
mistersquirrle Posted February 5, 2010 Share Posted February 5, 2010 (edited) 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 February 5, 2010 by mistersquirrle We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
leonick5 Posted February 5, 2010 Author Share Posted February 5, 2010 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 More sharing options...
Richard Robertson Posted February 5, 2010 Share Posted February 5, 2010 BlockInput returns a value indicating whether it worked or not. If Not BlockInput(True) Then MsgBox(0, "Error", "BlockInput didn't work") Link to comment Share on other sites More sharing options...
leonick5 Posted February 6, 2010 Author Share Posted February 6, 2010 Oh didn't thought of the return value. It returns >FALSE< Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 6, 2010 Share Posted February 6, 2010 That means that either another application has already blocked the input OR your program doesn't have permission to do so. Link to comment Share on other sites More sharing options...
mistersquirrle Posted February 6, 2010 Share Posted February 6, 2010 BlockInput() needs permission? Seeing as it's a VM I don't know why he wouldn't have the right permissions to call it. If something else were already blocking the input... Then why's the mouse still able to move? We ought not to misbehave, but we should look as though we could. Link to comment Share on other sites More sharing options...
leonick5 Posted February 6, 2010 Author Share Posted February 6, 2010 (edited) 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 February 6, 2010 by leonick5 Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 6, 2010 Share Posted February 6, 2010 You have to remember that the VM doesn't get access to a real mouse. VMWare will move the mouse in the VM because it has to. Does your guest OS have all service packs and whatnot installed? Link to comment Share on other sites More sharing options...
leonick5 Posted February 6, 2010 Author Share Posted February 6, 2010 (edited) 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 February 6, 2010 by leonick5 Link to comment Share on other sites More sharing options...
CHRIS1 Posted March 3, 2010 Share Posted March 3, 2010 (edited) 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 March 3, 2010 by CHRIS1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now