Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DetectHiddenWindows, On
- SetWinDelay, -1
- SetKeyDelay, -1
- SetBatchLines, -1
- GoSub Remin
- SetTimer, Remin, % 1000 * 60
- Loop, read, %A_ScriptDir%\keywords.ini
- {
- LineNumber = %A_Index%
- Loop, parse, A_LoopReadLine, |
- {
- if (A_Index == 1)
- abbrevs%LineNumber% := A_LoopField
- else if (A_Index == 2)
- tips%LineNumber% := A_LoopField
- else if (A_Index == 3)
- programs%LineNumber% := A_LoopField
- else if (A_Index == 4)
- params%LineNumber% := A_LoopField
- }
- tosay := abbrevs%LineNumber%
- }
- cnt = %LineNumber%
- Loop {
- Input, Key, L1 V, % "{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}"
- . "{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}"
- . "{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}{Escape}"
- If( ( Asc(Key) >= 65 && Asc(Key) <= 90 ) || ( Asc(Key) >= 97 && Asc(Key) <= 122 ) )
- Word .= Key
- Else
- {
- Word := ""
- Continue
- }
- tipup := false
- Loop %cnt%
- {
- if (Word == abbrevs%A_index%)
- {
- tip := tips%A_index%
- ToolTip %tip%
- tipup := true
- }
- else
- {
- if (tipup == false)
- ToolTip
- }
- }
- }
- $Tab::
- Loop %cnt%
- {
- if (Word != "" && Word == abbrevs%A_index%)
- {
- Word := ""
- StringLen, len, abbrevs%A_index%
- Loop %len%
- Send {Shift Down}{Left}
- Send {Shift Up}{BS}
- ToolTip
- program := programs%A_index%
- param := params%A_index%
- run, %program% %param%
- return
- }
- }
- Word := ""
- Send {Tab}
- Return
- ~LButton::
- ~MButton::
- ~RButton::
- ~XButton1::
- ~XButton2::
- Word := ""
- Tooltip
- Return
- Remin:
- WinMinimize, %A_ScriptFullPath% - AutoHotkey v
- WinHide, %A_ScriptFullPath% - AutoHotkey v
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement