Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

MouseMove doesn't work within Remote Desktop sessions


  • Please log in to reply
8 replies to this topic
superdave2k
  • Members
  • 19 posts
  • Last active: Jan 18 2007 02:08 PM
  • Joined: 15 Oct 2004
Hi, I just noticed something very strange, but it doesn't appear this has been reported before.

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.

Any ideas?

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
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.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


superdave2k
  • Members
  • 19 posts
  • Last active: Jan 18 2007 02:08 PM
  • Joined: 15 Oct 2004

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.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
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.

superdave2k
  • Members
  • 19 posts
  • Last active: Jan 18 2007 02:08 PM
  • Joined: 15 Oct 2004

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:
X100, Y100
X200, Y200 (as expected)

VERY strange...does anyone else have XP Pro that can replicate this over RDP?

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
i can only try scripts on client end... can't run them on server end.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


freakkk
  • Guests
  • Last active:
  • Joined: --
whenever you use remote desktop in full screen mode-- its like your tapped into its resources & sitting right in front of it. if your running an ahk script on that box (the host)-- then your script should work fine on it.. but if you minimize that window-- your back to using your local machines resources (and running progs..). this works in both directions-- i use my ahk locally-- but when remote desktoped ( :-) ) my mouse/kybrd hooks do not work on it (since the prog isn't executing on it..). this is the same reason why you have a cliboard on your local machine & on the host your connected to. a workaround that i use is to have the host that i'm connecting to not be in full screen mode-- this way i'm using my local machines ahk hooks-- & can movemouse.. or send kybrd on the host.

corey

ps.sorry if i'm missing your point

BoBo
  • Guests
  • Last active:
  • Joined: --
FYI. Assumed you use TS (Terminal Service) you can swap to Host-Mode using CTRL+ALT+PAUSE.

bolpx001
  • Members
  • 2 posts
  • Last active: Jul 04 2010 04:59 PM
  • Joined: 20 Feb 2010
Hi I too have this problem. Making the window of the remote session on the local machine a normal size, i.e. not full screen size, does not work. I am using Windows 7 remotely controlling an XP professional (service pack 3) machine using the 'remote desktop connection' that comes with Windows 7. Any help/ideas much appreciated - Paul