Advertisement
Rich4rd

Hotstrings with preview and with a trigger

Sep 27th, 2022
1,630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 0.73 KB | Software | 0 0
  1. ;Hotstrings with preview and with a trigger
  2. :C*:Amer::
  3. ToolTip, America, A_CaretX-10, A_CaretY-20
  4. Sleep, 1000
  5. ToolTip
  6. {
  7. input, key, L1 I M ; wait for the next 1 key
  8. if(key=="`;")
  9.    SendInput, {Text}America
  10.  Else
  11. SendInput, {Text}Amer
  12. }
  13. Return
  14.  
  15. ;=========================================================================================
  16. ;Hotstrings With Tip And Trigger
  17. tip(text) {
  18.     ToolTip, % text, A_CaretX-10, A_CaretY-20
  19.     Input, key, L1 I M
  20.     if (key=="`;")
  21.         SendInput, % text
  22.     else
  23.         SendInput, % SubStr(A_ThisHotkey, 6) . A_EndChar . key
  24.     ToolTip
  25. }
  26.  
  27. :Cox:US::tip("United States")
  28. :C*x:USA::tip("United States of America")
  29.  
  30. ;========================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement