-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
138 lines (116 loc) · 4.55 KB
/
install.ps1
File metadata and controls
138 lines (116 loc) · 4.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#
# KNEX Symbol - Windows Installation Script
# Run with: powershell -ExecutionPolicy Bypass -File install.ps1
#
$ErrorActionPreference = "Stop"
Write-Host ""
Write-Host "+==========================================================+" -ForegroundColor Cyan
Write-Host "| ₭ KNEXCOIN CURRENCY SYMBOLS - Windows INSTALLER |" -ForegroundColor Cyan
Write-Host "| Type ₭ (KNEX) and ⋖ (RAW) anywhere! |" -ForegroundColor Cyan
Write-Host "+==========================================================+" -ForegroundColor Cyan
Write-Host ""
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
# ============================================================
# STEP 1: Install Font
# ============================================================
Write-Host "[1/3] Installing KNEX Symbol Font..." -ForegroundColor Green
$FontPath = Join-Path $ScriptDir "KnexSymbol.ttf"
$FontsFolder = (New-Object -ComObject Shell.Application).Namespace(0x14)
if (Test-Path $FontPath) {
$FontsFolder.CopyHere($FontPath, 0x10)
Write-Host "Font installed to Windows Fonts folder"
} else {
Write-Host "Font file not found at $FontPath" -ForegroundColor Red
}
# ============================================================
# STEP 2: Create AutoHotkey Script
# ============================================================
Write-Host ""
Write-Host "[2/3] Creating AutoHotkey Script..." -ForegroundColor Green
$AhkScript = @'
; KNEX Currency Symbol AutoHotkey Script
; Hotkeys for typing ₭ (KNEX) and ⋖ (RAW) symbols
;
; Shortcuts:
; Alt+K -> ₭ + space (KNEX)
; Alt+Shift+K -> ₭ (no space)
; Alt+R -> ⋖ + space (RAW)
; Alt+Shift+R -> ⋖ (no space)
#NoEnv
#SingleInstance Force
SendMode Input
; KNEX Symbol (₭ U+20AD)
!k::Send {U+20AD}{Space}
!+k::Send {U+20AD}
; RAW Symbol (⋖ U+22D6)
!r::Send {U+22D6}{Space}
!+r::Send {U+22D6}
; Copy to clipboard variants
^!k::
Clipboard := Chr(0x20AD)
ToolTip, ₭ copied!
Sleep 1000
ToolTip
return
^!r::
Clipboard := Chr(0x22D6)
ToolTip, ⋖ copied!
Sleep 1000
ToolTip
return
'@
$AhkPath = Join-Path $env:USERPROFILE "Documents\KnexSymbol.ahk"
$AhkScript | Out-File -FilePath $AhkPath -Encoding UTF8
Write-Host "AutoHotkey script created at: $AhkPath"
# ============================================================
# STEP 3: Create Startup Shortcut
# ============================================================
Write-Host ""
Write-Host "[3/3] Setting up Auto-Start..." -ForegroundColor Green
$StartupFolder = [Environment]::GetFolderPath("Startup")
$ShortcutPath = Join-Path $StartupFolder "KnexSymbol.lnk"
# Check if AutoHotkey is installed
$AhkExe = "C:\Program Files\AutoHotkey\AutoHotkey.exe"
$AhkExeV2 = "C:\Program Files\AutoHotkey\v2\AutoHotkey.exe"
if (Test-Path $AhkExeV2) {
$AhkExe = $AhkExeV2
}
if (Test-Path $AhkExe) {
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($ShortcutPath)
$Shortcut.TargetPath = $AhkExe
$Shortcut.Arguments = "`"$AhkPath`""
$Shortcut.Save()
Write-Host "Startup shortcut created"
# Start the script now
Start-Process $AhkExe -ArgumentList "`"$AhkPath`""
Write-Host "KNEX Symbol hotkeys are now active!"
} else {
Write-Host ""
Write-Host "AutoHotkey not found. Please install it:" -ForegroundColor Yellow
Write-Host " https://www.autohotkey.com/download/" -ForegroundColor Yellow
Write-Host ""
Write-Host "After installing AutoHotkey, double-click:" -ForegroundColor Yellow
Write-Host " $AhkPath" -ForegroundColor Yellow
}
# ============================================================
# DONE
# ============================================================
Write-Host ""
Write-Host "+==========================================================+" -ForegroundColor Cyan
Write-Host "| INSTALLATION COMPLETE! |" -ForegroundColor Cyan
Write-Host "+==========================================================+" -ForegroundColor Cyan
Write-Host ""
Write-Host "Keyboard shortcuts:" -ForegroundColor Green
Write-Host ""
Write-Host " KNEX (₭): RAW (⋖):"
Write-Host " --------------------- ---------------------"
Write-Host " * Alt+K -> ₭ + space * Alt+R -> ⋖ + space"
Write-Host " * Alt+Shift+K -> ₭ * Alt+Shift+R -> ⋖"
Write-Host " * Alt+Ctrl+K -> copy * Alt+Ctrl+R -> copy"
Write-Host ""
Write-Host " Currency: 1 ₭ = 10,000,000⋖ (10M RAW)"
Write-Host ""
Write-Host "Happy KNEXing! ₭ ⋖" -ForegroundColor Green
Write-Host ""
Read-Host "Press Enter to exit"