Last active
February 8, 2024 15:01
-
-
Save Geogboe/dff0d347ffb811fc17360f4b3b1f218f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Inputs text into vmware console | |
- VMware console MUST be running at same level as script. e.g elevated or not elevated | |
- Intiate the hotkey from outside of vmware. | |
- This is useful for pasting long passwords or scripts | |
- Usage: | |
1. Open vmware console | |
2. Copy some content from your local machine to your clipboard | |
3. Run the autohotkey script ( elevated if vmware console is running elevated ). | |
4. press shift+f5 which will switch back to the vmware console and paste your text | |
Note: | |
- If pasting isn't working, verify that both autohotkey and vmware console are running at the same level. IE elevated or not elevated. See this article to verify the process: https://winaero.com/blog/how-to-check-if-a-process-is-running-as-administrator-elevated-in-windows/ | |
Hotkey = shift+f5 | |
v0.0.4 - geogboe - 2-26-18 - Added additional instructions | |
v0.0.2 - geogboe - 12-13-17 - fixed sendinput by adding raw to prevent special chars from causing issue | |
v0.0.1 - geogboe - 9-11-17 - initial commit | |
*/ | |
; Automatically overwrite any running instance of this script | |
#SingleInstance force | |
+F5:: | |
; Active the VMware Window | |
WinActivate, , vmplayerUnibar, , | |
Sleep 500 | |
; Connect to window | |
ControlFocus, VMWindow1, , vmplayerUnibar, , | |
Sleep 300 | |
; Select VM | |
SendInput, ^g | |
Sleep 300 | |
; Paste conten | |
SendInput, {raw}%clipboard% | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment