Subscripts
Posted: 11 May 2024, 09:26
Hello. With the help of forum users, I have an AHK V.2 script to insert subscripts in the Paint.net app and Edge browser.
The problem is that not all letters are as subscripts in Windows 10's "Character Map", where I extracted the subscripts from. For example, b, c, d, among others, are not there. They do not have Unicode encoding. Is there a way to insert these characters using an AHK script? Thank you so much.
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance
char := Map(
'a', 'ₐ'
, 'e', 'ₑ'
, 'h', 'ₕ'
, 'i', 'ᵢ'
, 'j', 'ⱼ'
, 'k', 'ₖ'
, 'l', 'ₗ'
, 'm', 'ₘ'
, 'n', 'ₙ'
, 'o', 'ₒ'
, 'p', 'ₚ'
, 'r', 'ᵣ'
, 's', 'ₛ'
, 't', 'ₜ'
, 'u', 'ᵤ'
, 'v', 'ᵥ'
, 'x', 'ₓ'
)
ih := InputHook(), ih.KeyOpt('{All}', 'E')
#HotIf WinActive('ahk_exe paintdotnet.exe') or WinActive('ahk_exe msedge.exe')
LAlt::ih.Start(), ih.Wait(), char.Has(ih.EndKey) && Send(char[ih.EndKey])
#HotIf