SW AutoHotkey
A useful tool for keyboard shortcuts is AutoHotkey. AutoHotkey is a powerful scripting language that allows users to automate tasks and create custom shortcuts on their Windows computers. I use it to enter some phrases that I use on daily basis. However, there is one not so obvious usage when working with remote computers that have disabled access to clipboard (copy/paste doesn't work). What you can do is, to copy text on your computer and use AutoHotkey to "type it" for you. And it will type it also in the remote computer.
To do that, you can use the following script (it maps the shortcut to CTRL+ALT+3, adjust accordingly):
^!3::
SendRaw, %Clipboard%
return
My script lays in a network drive, so I set it up once and don't need to think about it with future devices. There is only one more thing, and that is to start the script on Windows startup. You can achieve this by creating a shortcut of your AutoHotkey script and position it to %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
.
For that, the following PowerShell script can be used:
$shell = New-Object -ComObject ("WScript.Shell")
$shortcut = $shell.CreateShortcut($env:USERPROFILE + "\Start Menu\Programs\Startup\" + "AutoHotkey.lnk")
$targetPath = "$PSScriptRoot\" + "AutoHotkey.ahk"
Write-Host $targetPath
$shortcut.TargetPath = $targetPath
$shortcut.Save()
You must position the script with the AutoHotkey.ahk
file. Then open PowerShell navigate to the directory where both files reside and run the PowerShell script. Next time you start your computer the AutoHotkey script will be up and running.
Example AutoHotkey script can be found here and PowerShell script here.
In conclusion, AutoHotkey is a useful tool that can help users automate tasks and create custom shortcuts on Windows computers. You can use it also in some not obvious ways like overcoming a restriction for copy/pasting to remote computer.
- Previous: Domain basics
- Next: Cron expression