Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. ; Create an object (array) to save the selected word (value)
  2. ; each time you press your key (combination):
  3.  
  4. MyArray := []
  5. Index := 0
  6. MaxIndex = 12 ; specific amount of words
  7.  
  8.  
  9. ; select next word and press your key (e.g. esc) to save the selected word in the array:
  10.  
  11. esc::
  12. Index++ ; checks the number in the variable "Index" and increases it by 1, each time you press esc.
  13. ClipSaved := ClipboardAll ; save the entire clipboard to the variable ClipSaved
  14. clipboard := "" ; empty clipboard
  15. Send, ^c ; copy the selected word
  16. ClipWait 1 ; wait for the clipboard to contain data
  17. If !ErrorLevel ; If NOT ErrorLevel clipwait found data on the clipboard
  18. {
  19. if (Index = MaxIndex+1) ; when the specific amount of words is exceeded
  20. {
  21. Index := 1 ; set this variable to 1
  22. MyArray := [] ; recreate the object (empty the array)
  23. }
  24. MyArray.Insert(Index, clipboard)
  25. }
  26. Sleep, 300
  27. clipboard := ClipSaved ; restore original clipboard
  28. return
  29.  
  30. f1:: SendInput, % MyArray[1]
  31. f2:: SendInput, % MyArray[2]
  32. f12:: SendInput, % MyArray[12]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement