Advertisement
Guest User

Untitled

a guest
Mar 24th, 2012
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. DetectHiddenWindows, On
  2. SetWinDelay, -1
  3. SetKeyDelay, -1
  4. SetBatchLines, -1
  5. GoSub Remin
  6. SetTimer, Remin, % 1000 * 60
  7.  
  8. Loop, read, %A_ScriptDir%\keywords.ini
  9. {
  10. LineNumber = %A_Index%
  11. Loop, parse, A_LoopReadLine, |
  12. {
  13. if (A_Index == 1)
  14. abbrevs%LineNumber% := A_LoopField
  15. else if (A_Index == 2)
  16. tips%LineNumber% := A_LoopField
  17. else if (A_Index == 3)
  18. programs%LineNumber% := A_LoopField
  19. else if (A_Index == 4)
  20. params%LineNumber% := A_LoopField
  21. }
  22. tosay := abbrevs%LineNumber%
  23. }
  24. cnt = %LineNumber%
  25.  
  26. Loop {
  27. Input, Key, L1 V, % "{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}"
  28. . "{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}"
  29. . "{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}{Escape}"
  30.  
  31. If( ( Asc(Key) >= 65 && Asc(Key) <= 90 ) || ( Asc(Key) >= 97 && Asc(Key) <= 122 ) )
  32. Word .= Key
  33. Else
  34. {
  35. Word := ""
  36. Continue
  37. }
  38. tipup := false
  39. Loop %cnt%
  40. {
  41.  
  42. if (Word == abbrevs%A_index%)
  43. {
  44. tip := tips%A_index%
  45. ToolTip %tip%
  46. tipup := true
  47. }
  48. else
  49. {
  50. if (tipup == false)
  51. ToolTip
  52. }
  53. }
  54. }
  55.  
  56. $Tab::
  57. Loop %cnt%
  58. {
  59. if (Word != "" && Word == abbrevs%A_index%)
  60. {
  61. Word := ""
  62.  
  63. StringLen, len, abbrevs%A_index%
  64. Loop %len%
  65. Send {Shift Down}{Left}
  66. Send {Shift Up}{BS}
  67.  
  68. ToolTip
  69. program := programs%A_index%
  70. param := params%A_index%
  71. run, %program% %param%
  72. return
  73. }
  74. }
  75. Word := ""
  76. Send {Tab}
  77. Return
  78.  
  79. ~LButton::
  80. ~MButton::
  81. ~RButton::
  82. ~XButton1::
  83. ~XButton2::
  84. Word := ""
  85. Tooltip
  86. Return
  87.  
  88. Remin:
  89.  
  90. WinMinimize, %A_ScriptFullPath% - AutoHotkey v
  91. WinHide, %A_ScriptFullPath% - AutoHotkey v
  92. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement