Advertisement
Guest User

Untitled

a guest
Aug 27th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. /*
  2. ___ _ _ ____
  3. / __\ (_)_ __ /___ \_ _ ___ _ _ ___
  4. / / | | | '_ \ // / / | | |/ _ \ | | |/ _ \
  5. / /___| | | |_) / \_/ /| |_| | __/ |_| | __/
  6. \____/|_|_| .__/\___,_\ \__,_|\___|\__,_|\___|
  7. |_|coded by errorseven @ 8/26/2016
  8.  
  9. Usage:
  10.  
  11. Ctrl + V Pastes based on Mode and contents of your ClipQueue
  12. Ctrl + < Move Queue Pointer Left
  13. Ctrl + > Move Queue Pointer Right
  14. Ctrl + Alt + M Select used with Pointer, Queue Pops 1st Element Queue.
  15. Ctrl + Alt + X Clear ClipQueue
  16.  
  17. */
  18.  
  19. clipQueue := [], p := 1
  20. clipPrevious := ""
  21. Mode := "Select"
  22.  
  23. setTimer, checkClipboard, 100
  24.  
  25. $^v::
  26. setTimer, checkClipboard, Off
  27.  
  28. if (Mode == "Select")
  29. clipboard := clipQueue[p]
  30. else if (Mode == "Queue") && (clipQueue.length())
  31. clipboard := clipQueue.removeAt(1)
  32.  
  33. send, {Ctrl down}v{Ctrl Up}
  34. clipboard := clipPrevious
  35. setTimer, checkClipboard, On
  36. return
  37.  
  38. ^!m::
  39. Mode := Mode == "Select"
  40. ? "Queue"
  41. : "Select"
  42.  
  43. TrayTip, Mode, % "Set to " Mode,,500
  44. return
  45.  
  46. ^!x::clipQueue := []
  47.  
  48. ^,::
  49. p := p > 1 ? p - 1 : clipQueue.MaxIndex()
  50. tooltip, % clipQueue[p]
  51. SetTimer, RemoveToolTip, 500
  52. return
  53.  
  54. ^.::
  55. p := p < clipQueue.MaxIndex() ? p + 1 : 1
  56. tooltip, % clipQueue[p]
  57. SetTimer, RemoveToolTip, 500
  58. return
  59.  
  60. checkClipboard:
  61. if (clipboard != clipPrevious) {
  62. clipQueue.push(clipboard)
  63. clipPrevious := clipboard
  64. p := clipQueue.maxindex()
  65. }
  66. return
  67.  
  68. RemoveToolTip:
  69. SetTimer, RemoveToolTip, Off
  70. ToolTip
  71. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement