MouseMove doesn't work within Remote Desktop sessions
If I run a AHK script on a machine I have Remote Desktop'ed (I know that's not a verb) into (running XP Pro), the MouseMove command doesn't move the mouse at all. I've tried "CoordMode, Mouse, Screen" just to see if that would help and it doesn't.
However, if I log back in locally (at the console) of the machine where MouseMove wasn't working, and re-run the script with MouseMove, the pointer DOES move.
The strange thing is, other functions (PixelSearch, Send, Win*) all seem to work just fine, only MouseMove seems to not work.
firstly i've tried it just with keybd (not mouse), if you run the script *after* starting remote desktop, and the script has keybd hook, then it functions normally. probably that's true with mouse too. i can't test mouse functions right now. btw if the remote desktop window is not full screen, all commands should work normally.
I upgraded to the latest version (1.026.01), forced the mouse hook to install, and it still did not work.
To be clear, the AHK script is running on the box I am remote desktoping into. It works fine on that box when I run it at the console (not over RDP), but fails to move the mouse at all when I remote into the machine and run it.
Is it possible that the cursor really is moving on the remote machine but that you just can't see it locally? In other words, maybe your local cursor takes precedence over the remote cursor.
Good suggestion. However with Remote Desktop (unlike some VNC implementations) the remote cursor always tracks the local.
Even stranger, the following script:
MouseMove, 100, 100, 50 MouseGetPos, xpos, ypos Msgbox, The cursor is at X%xpos% Y%ypos%. MouseMove, 200, 200, 50 MouseGetPos, xpos, ypos Msgbox, The cursor is at X%xpos% Y%ypos%.
Reports the following coords over Remote Desktop:
X100, Y100 for the first MouseMove
X32200, Y32200 (!) for the second MouseMove
When run locally:
X200, Y200 (as expected)
VERY strange...does anyone else have XP Pro that can replicate this over RDP?
ps.sorry if i'm missing your point