Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Create an object (array) to save the selected word (value)
- ; each time you press your key (combination):
- MyArray := []
- Index := 0
- MaxIndex = 12 ; specific amount of words
- ; select next word and press your key (e.g. esc) to save the selected word in the array:
- esc::
- Index++ ; checks the number in the variable "Index" and increases it by 1, each time you press esc.
- ClipSaved := ClipboardAll ; save the entire clipboard to the variable ClipSaved
- clipboard := "" ; empty clipboard
- Send, ^c ; copy the selected word
- ClipWait 1 ; wait for the clipboard to contain data
- If !ErrorLevel ; If NOT ErrorLevel clipwait found data on the clipboard
- {
- if (Index = MaxIndex+1) ; when the specific amount of words is exceeded
- {
- Index := 1 ; set this variable to 1
- MyArray := [] ; recreate the object (empty the array)
- }
- MyArray.Insert(Index, clipboard)
- }
- Sleep, 300
- clipboard := ClipSaved ; restore original clipboard
- return
- f1:: SendInput, % MyArray[1]
- f2:: SendInput, % MyArray[2]
- f12:: SendInput, % MyArray[12]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement