Comments (12)
Hi,
I don't have Hyper-V to test with, although I have tested on VMware ESXi and have noted similar behaviour.
I performed a test using Move Mouse Cursor and Click Mouse Button actions. Although once I had clicked inside the console of the VM I could no longer see the mouse cursor moving, the clicking action was passing through as expected. I suspect the mouse movement is also passing through, even though this may not be visible on screen.
Without knowing what you are trying to achieve it's hard to give advise on your next course of action.
If you are trying to automate tasks inside the VM, have you tried running Move Mouse on the actual VM itself rather than your workstation?
from movemouse.
Hi,
my work laptop locks up after 3 minutes of inactivity. I usually work on it via remote desktop and it's annoying that it locks up so quickly. So it's not about automating VM guest tasks.
The idea is not to lock up the VM host when there is no activity on it.
When the focus is on the VM guest, the VM host does not detect MoveMouse actions. I suspect that the system focus/caret is received in some specific way by the VM guest window and blocked, which causes the "last input tick" to malfunction.
In my scenarios the mouse is supposed to move down the desktop to the windows taskbar of the VM host, then to the right where in windows 11 I usually don't have apps and then MoveMouse should left click. So the mouse is not moving in the host.
from movemouse.
Have you tried sending a mouse click in a safe position inside the VM? I was able to position the mouse pointer over the Start Button and click it to reset the idle time.
from movemouse.
MoveMouse on host. Focus in VM guest.
Action "Move Mouse Cursor" Distance 1500 South.
Behaviour repeat action every 5 sec.
Idle. The green circle counts down. Bang.
Mouse doesn't move both host and guest.
It's probably the SerCursorPos native function misbehaving in conjunction with focus in the VM guest . The expected action is that the mouse should move in the host.
from movemouse.
Mouse click action doesn't work either. The VM guest Start button does not open.
from movemouse.
OK - there's clearly a fundamental difference between a VMware Remote Console and the Hyper-V equivalent.
I don't have Hyper-V installed at the moment, so allow me some time to sort that out and I will see if I can help troubleshoot further.
from movemouse.
I have installed and witnessed for myself how Hyper-V will steal mouse and keyboard activity when in focus. I don't think there's anything Move Mouse, or any other software/script/macro can do generate activity on the host machine that won't be intercepted by the VM.
There may however be a workaround.
If you run the following code in an elevated PowerShell console (settings the $VmName variable accordingly), it will send keystrokes and/or mouse movement directly into the VM.
$VmName = "VM01"
$VmComputerSystem = Get-WmiObject -Namespace "root\virtualization\v2" -Class "Msvm_ComputerSystem" -Filter "ElementName = '$VmName'"
# Send keystrokes
$Keyboard = $VmComputerSystem.GetRelated("Msvm_Keyboard")
$Keyboard.TypeText("Hello!")
# Send mouse movement
$Mouse = $VmComputerSystem.GetRelated("Msvm_Ps2Mouse")
$Mouse.SetRelativePosition(1, 0)
I ran the Watch Idle Time.ps1 script on the VM and can confirm that either one of these actions will reset the idle time.
You could use Move Mouse on you local workstation to keep your session alive, whilst also running this code on a loop to keep the VM alive.
from movemouse.
I haven't tried the workaround you provided yet. I have an idea to get the focus out of the VM.
Can you add a special action to MoveMouse ("Activate Desktop") that will move the focus to the desktop of the machine it is running on - in my case VM host.
Maybe WinSDK GetDesktopWindow and SetFocus?
So my scenario will be this:
- Activate Desktop
- Move mouse cursor
- etc......
Maybe it will work. :)
from movemouse.
You can use a PowerShell Script Action to accomplish this.
https://www.google.com/search?q=getdesktopwindow+powershell
If this does indeed work, presumably you will still need to use the code in my previous reply to keep the VM alive along with Move Mouse on the host computer, so not sure what this will buy you.
from movemouse.
The cmder(https://github.com/cmderdev/cmder) program also has the same problem, where the cursor actually does not move when the cmder window is in the active state.
from movemouse.
@kenpark76 would you mind creating a separate issue for this as I suspect this is unrelated?
from movemouse.
@vonkaz do you require any more help with this or are you happy to accept the solution I proposed?
from movemouse.
Related Issues (20)
- Feature Request: Save App Settings in the Same Folder HOT 2
- Taskbar icons not explained HOT 2
- Tooltip seems to be stuck in top left corner of the screen HOT 13
- Feature Request / Issue - Random Start Time HOT 3
- Mac support HOT 1
- Does not work after a hibernate. HOT 5
- Version 4.16.3 is seen as a trojan horse by Trellix AV HOT 2
- Microsoft Defender SmartScreen issue HOT 1
- Doesnt register clicks for this game HOT 1
- Add Name properties to controls for accessibility
- Import Export of settings HOT 1
- Change Process Name HOT 7
- [Feature Request] Taskbar icon status indicator - disable HOT 3
- Scroll random distance HOT 1
- Hide the annoying popup in the top left corner. HOT 1
- Stops working and sometimes doesn't work on start. HOT 14
- Is it possible to export settings? HOT 1
- Windows Defender detect MoveMouse as an virus HOT 1
- Range of mouse movement distance and probability HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from movemouse.