AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MouseMove doesn't work within Remote Desktop sessions

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
superdave2k



Joined: 15 Oct 2004
Posts: 19

PostPosted: Sat Feb 12, 2005 5:24 pm    Post subject: MouseMove doesn't work within Remote Desktop sessions Reply with quote

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?
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Sat Feb 12, 2005 7:56 pm    Post subject: Reply with quote

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.
_________________
Back to top
View user's profile Send private message
superdave2k



Joined: 15 Oct 2004
Posts: 19

PostPosted: Sat Feb 12, 2005 10:29 pm    Post subject: Reply with quote

Rajat wrote:
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.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Feb 13, 2005 12:01 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
superdave2k



Joined: 15 Oct 2004
Posts: 19

PostPosted: Sun Feb 13, 2005 1:35 am    Post subject: Reply with quote

Chris wrote:
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:
Code:

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?
Back to top
View user's profile Send private message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Sun Feb 13, 2005 6:01 am    Post subject: Reply with quote

i can only try scripts on client end... can't run them on server end.
_________________
Back to top
View user's profile Send private message
freakkk
Guest





PostPosted: Fri Mar 04, 2005 1:17 pm    Post subject: Reply with quote

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 ( Smile ) 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
Back to top
BoBo
Guest





PostPosted: Fri Mar 04, 2005 1:40 pm    Post subject: Reply with quote

FYI. Assumed you use TS (Terminal Service) you can swap to Host-Mode using CTRL+ALT+PAUSE.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group