Jump to content

Mousemove doesn't move cursor


Alodar
 Share

Recommended Posts

In windows 7 on a single machine, the mousemove command does not work. It moves the mouse sort of (by which I mean a tooltip for where I've supposedly moved the mouse appears), but the cursor itself, and thus any 'click' events do not get moved. Any ideas on how I can figure out why this is happening on this machine? It's all up to date via service packs and the like, UAC is off, RequireAdmin is on...

What can I do to troubleshoot/fix this?

Link to comment
Share on other sites

Well, I'm running 32, not 64, but shouldn't really make a difference?

Run("C:\Program Files\LogMeIn\x86\LogMeInToolkit.exe")
WinWait("LogMeIn")
WinActivate("LogMeIn")
Opt("MouseCoordMode", 0)
MouseMove(30, 65)
Sleep(5000)
MouseClick("left", 30, 65)
Sleep(30000)
MouseClick("left", 30, 65)

I don't even get to the MouseClick point because the MouseMove event doesn't have anything happen.

Edited by Alodar
Link to comment
Share on other sites

Did it occur to you that

WinWait("LogMeIn")

may not be completing?

Try just MouseMove(0,0) on its own.

Shouldnt matter the version of the OS

I ran this script and it all works for me, i suggest that you look into the WinWait..as JohnOne said

Edited by chachew
Link to comment
Share on other sites

Yeah, I did check that. I removed everything except MouseMove itself. I commented out the Opt Coordmode also to see if that would make a difference, but it didn't seem to make a difference either. It works fine everywhere except on this one computer, so I'm betting it's something weird with the install or something, but I have no idea how or where to check it.

Link to comment
Share on other sites

Sounds as though there is something seriously wrong with the OS installation, or some sort of gung ho security layer in a firewall or something intercepting some Windows API.

I'm just rambling though.

Just for reference, what is the spec of the computer? is it some virtual machine installed, is it mac with wine etc...

This info is no good to me, but might be for someone else, I'd just wipe it and re-install windows (drastic)

You could proceed by checking other Autoit native functions, and maybe some _WinAPI* functions to move the mouse and log the results of those.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Nope, didn't do anything. The install is a Windows 7 install on a dell (it's the 'Dell install' type of thing). So I can't really install base windows 7, cause of Dell's retardation for drivers and the like. Plus, it's a work computer, so it would be frowned on.

It's just this one computer doing it, it's really odd. I'm starting to think I'll just have to find a way to do it with keyboard commands (tab around until I get to stuff and use spacebar and the like).

Link to comment
Share on other sites

  • 3 years later...

i'm experiencing the same issue (with AutoIt v3.3.12.0 plus SciTE4AutoIt3 14.801.2025.0):

  • Win7 SP1 (x64), running on physical machine - MouseMove working OK
  • Win7 SP1 (x64), running as guest in vmware workstation 9.0.4 - MouseMove does NOT work

in the VM i have installed vmware tools: "vmtoolsd.exe" with file version 9.2.4.27715

example code:

Sleep(1000)
Local $aPos1 = MouseGetPos()

MouseMove(5, 5, 0)

Sleep(1000)
Local $aPos2 = MouseGetPos()

If ($aPos2[0] <> 5) Or ($aPos2[0] <> 5) Then
    MsgBox(0, "ERROR", "MouseMove failed:" & @CRLF _
    & "old pos: " & $aPos1[0] & "," & $aPos1[1] & @CRLF _
    & "new pos: " & $aPos2[0] & "," & $aPos2[1] )
Else
    MsgBox(0, "SUCCESS", "MouseMove succeeded.")
EndIf

strangely it thinks it was successful.

however, the mouse cursor is not moved!

Edited by francoiste
Link to comment
Share on other sites

Sounds like a VMWare issue, as it's working on a physical machine.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • 3 years later...
  • Moderators

@MattM Did you notice this thread is almost 4 years old? Please don't resurrect old posts; the language has changed a lot in 4 years, what worked then may not today.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...