I'm trying to set up AutoHotKey to do the following: If I type "34c" I want it to change to "34°C" with any number.

17.5c → 17.5°C

It's easy to do with a "c" by itself by when it's at the end of a number I'm not sure how to make that work.

  • Do you want that conversion in a specific program or anywhere you type? – Biswapriyo Jun 15 '18 at 15:10
  • Anywhere I type would be ideal – Andrew Jun 15 '18 at 15:17
  • AutoHotKey supports RegExReplace which can be used here. Syntax and example can be found here. However, i am not regex expert, so, cannot help further. – Sandeep Jun 15 '18 at 15:19
  • @andy Try this :\d:c::°C – Biswapriyo Jun 15 '18 at 17:04
; *: An ending character is not required 
; ?: The hotstring will be triggered even when it is inside another word 

#Hotstring * ? 

; ...



The other answers above are more suited to your exact usage case, but this is my hotkey to convert "deg.", which makes it possible to type °F or °C anywhere in a sentence (regardless of whether it follows a numeric temperature or not).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.