Jump to content

Mousemove and mouseclick on remote server

Recommended Posts

I'm new to autoit, but I've done some programming and scripting before.

I'm remoteing into a 2008 R2 64bit server. The server has autoit installed on it and the script I'm trying to run is running on the server itself. I'm not trying to run the script on my local machine and have it access the RDP session.

$jPos = MouseGetPos()
    MsgBox(0, "Mouse x,y:", $jPos[0] & "," & $jPos[1])
WinActivate("Hyper-V Manager")
WinWaitActive("Hyper-V Manager")
MouseMove(219, 148)
$jPos = MouseGetPos()
    MsgBox(0, "Mouse x,y:", $jPos[0] & "," & $jPos[1])

When I bring up Hyper-V Manager on my local machine, this works perfectly and reports the expected mouse coordinates and performs the right click where I need it.

When I copy and past it into SciTE on the server and run it, I get the same mouse coordinates at the start and end of the script, so the mouse doesn't seem to be moving.

I've looked through a lot of posts on this forum and a few implied that the mouse actually does move, it's just not shown over the remote desktop connection, but the coordinates I'm getting seem to contradict that and I'm not seeing the results of the right click even either.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...