Code: Select all
vboxmanage controlvm "vmname" keyboardputscancode <hex>
Code: Select all
$vBox = New-Object -ComObject VirtualBox.VirtualBox
$MACHINE = $vBox.FindMachine("Windows10")
$SESSION_ROOT = New-Object -ComObject VirtualBox.Session
$SESSION_GUEST = New-Object -ComObject VirtualBox.Session
$MACHINE.LockMachine($SESSION_ROOT, 1) # Locking the machine in Shared LockType
$SESSION_GUEST.Console.Mouse.putMouseEventAbvsolute(632, 687, 0, 0, 1)
Code: Select all
You cannot call a method on a null-valued expression.
At D:\loren\Documents\test.ps1:9 char:1
+ $SESSION_GUEST.Console.Mouse.putMouseEventAbvsolute(632, 687, 0, 0, 1 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull