Skip to content

Instantly share code, notes, and snippets.

@ivankovnatsky
Created October 10, 2024 17:58
Show Gist options
  • Save ivankovnatsky/47e10b05b2f6d61888a00188ee7e8aea to your computer and use it in GitHub Desktop.
Save ivankovnatsky/47e10b05b2f6d61888a00188ee7e8aea to your computer and use it in GitHub Desktop.
# Use environment variables to get the current user's AppData folder
$StartupFolder = [Environment]::GetFolderPath('Startup')
$FilePath = Join-Path -Path $StartupFolder -ChildPath "kinput.ahk"
# Create the AutoHotkey v2 script content
$ScriptContent = 'CapsLock::Send("{Alt Down}{Shift Down}{Shift Up}{Alt Up}")'
# Write the content to the file
Set-Content -Path $FilePath -Value $ScriptContent -Force
# Output the result
Write-Host "AutoHotkey v2 script created at: $FilePath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment