-
Notifications
You must be signed in to change notification settings - Fork 72
/
Fifo.ahk
67 lines (56 loc) · 977 Bytes
/
Fifo.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
Plugin : FIFO (Reverse paste)
Purpose : Paste back in the order in which the entries were added to the clipboard history
Version : 1.0
CL3 version : 1.7
History:
- 1.0 Initial version
*/
FifoInit:
FIFOID:=0
FIFOIDCOUNTER:=0
FIFOACTIVE:=0
Return
^#F10::
Gosub, FifoInit
FIFOACTIVE:=1
Gosub, FifoActiveMenu
Gosub, BuildMenuFromFifo
Return
#If FIFOACTIVE
; Paste FIFO MODE
^v::
If (FIFOID = 0) ; just in case we cancelled the FIFO selection menu
{
Clipboard:=History[1].text
PasteIt()
Sleep 100
Gosub, FifoInit
}
Clipboard:=History[FIFOID].text
PasteIt()
FIFOIDCOUNTER++
If (FIFOID = FIFOIDCOUNTER)
{
Gosub, FifoInit
Gosub, FifoActiveMenu
}
Return
; stop FIFO
^+#F10::
Gosub, FifoInit
Gosub, FifoActiveMenu
Return
#If
FifoActiveMenu:
If FIFOACTIVE
{
Menu, tray, Check, &FIFO Active
}
Else
{
Menu, tray, UnCheck, &FIFO Active
TrayTip, FIFO, FIFO Paste Mode Deactivated, 2, 1
Gosub, FifoInit
}
Return