18
18
19
19
; @Ahk2Exe-SetName Clipjump
20
20
; @Ahk2Exe-SetDescription Clipjump
21
- ; @Ahk2Exe-SetVersion 10.7
21
+ ; @Ahk2Exe-SetVersion 10.7.2.6
22
22
; @Ahk2Exe-SetCopyright Avi Aryan
23
23
; @Ahk2Exe-SetOrigFilename Clipjump.exe
24
24
@@ -41,13 +41,13 @@ global ini_LANG := "" , H_Compiled := (Substr(A_AhkPath, Instr(A_AhkPath, "\", 0
41
41
; Capitalised variables (here and everywhere) indicate that they are global
42
42
43
43
global PROGNAME := " Clipjump"
44
- global VERSION := " 10.7"
44
+ global VERSION := " 10.7.2.6b "
45
45
global CONFIGURATION_FILE := " settings.ini"
46
46
47
47
ini_LANG := ini_read(" System" , " lang" )
48
48
global TXT := Translations_load(" languages/" ini_LANG " .txt" ) ; Load translations
49
49
50
- global UPDATE_FILE := " https ://raw.github.com/aviaryan/Clipjump/master /version.txt"
50
+ global UPDATE_FILE := " http ://sourceforge.net/projects/clipjump/files /version.txt/download "
51
51
global PRODUCT_PAGE := " http://clipjump.sourceforge.net"
52
52
global HELP_PAGE := " http://clipjump.sourceforge.net/docs"
53
53
global AUTHOR_PAGE := " http://aviaryan.github.io"
@@ -88,14 +88,14 @@ global WORKINGHT := tempbottom-temptop
88
88
global restoreCaller := 0
89
89
90
90
; Global Inits
91
- global CN := {}, CUSTOMS := {}, CDS := {}, SEARCHOBJ := {}, HISTORYOBJ := {}, TOTALCLIPS, ACTIONMODE := {}, PLUGINS := {}, ACTIONMODE_DEF := " H S C X F D P O E F1 L "
91
+ global CN := {}, CUSTOMS := {}, CDS := {}, SEARCHOBJ := {}, HISTORYOBJ := {}, TOTALCLIPS, ACTIONMODE := {}, PLUGINS := {}, STORE := {} ; store=global public storage space
92
92
global cut_is_delete_windows := " XLMAIN QWidget" ; excel, kingsoft office
93
- global CURSAVE, TEMPSAVE, LASTCLIP, LASTFORMAT, Islastformat_Changed := 1 , IScurCBACTIVE := 0
93
+ global CURSAVE, TEMPSAVE, LASTCLIP, LASTFORMAT, Islastformat_Changed := 1 , IScurCBACTIVE := 0 , curPformat, curPfunction, curPisPreviewable
94
94
global NOINCOGNITO := 1 , SPM := {}, protected_DoBeep := 1
95
95
96
96
; Initailizing Common Variables
97
97
global CALLER_STATUS, CLIPJUMP_STATUS := 1 ; global vars are not declared like the below , without initialising
98
- global CALLER := CALLER_STATUS := true , IN_BACK := false
98
+ global CALLER := CALLER_STATUS := 1 , IN_BACK := 0 , MULTIPASTE, PASTEMODE_ACT
99
99
global CLIP_ACTION := "" , ONCLIPBOARD := 0 , ISACTIVEEXCEL := 0 , HASCOPYFAILED := 0 , ctrlRef ; specific purpose global vars
100
100
101
101
; Init General vars
@@ -128,12 +128,12 @@ else if (ini_Version != VERSION)
128
128
129
129
; Global Ini declarations
130
130
global ini_IsImageStored , ini_Quality , ini_MaxClips , ini_Threshold , ini_IsChannelMin := 1 , CopyMessage, FORMATTING
131
- , Copyfolderpath_K, Copyfilepath_K, Copyfilepath_K, channel_K, onetime_K, paste_k, actionmode_k, ini_is_duplicate_copied, ini_formatting, ini_actmd_keys
131
+ , Copyfolderpath_K, Copyfilepath_K, Copyfilepath_K, channel_K, onetime_K, paste_k, actionmode_k, ini_is_duplicate_copied, ini_formatting
132
132
, ini_CopyBeep , beepFrequency , ignoreWindows, ini_defEditor
133
133
134
134
; (search) paste mode keys
135
135
global pastemodekey := {} , spmkey := {}
136
- temp_keys := " a|c|s|z|space|x|e|up|down|f|h"
136
+ temp_keys := " a|c|s|z|space|x|e|up|down|f|h|Enter "
137
137
loop , parse , temp_keys,|
138
138
pastemodekey[A_LoopField ] := " ^" A_LoopField
139
139
temp_keys := " Enter|Up|Down|Home"
@@ -142,13 +142,14 @@ loop, parse, temp_keys,|
142
142
143
143
global windows_copy_k, windows_cut_k
144
144
145
+ init_actionmode()
145
146
; Initialising Clipjump Channels
146
147
initChannels()
147
148
; loading Settings
148
149
load_Settings(1 )
149
150
validate_Settings()
150
151
; load plugins
151
- ; loadPlugins() ;<--- INACTIVE
152
+ loadPlugins()
152
153
; load custom settings
153
154
loadCustomizations()
154
155
@@ -201,7 +202,6 @@ hkZ(windows_copy_k, "windows_copy") , hkZ(windows_cut_k, "windows_cut")
201
202
OnMessage (0x4a , " Receive_WM_COPYDATA" ) ; 0x4a is WM_COPYDATA
202
203
; Clean History
203
204
historyCleanup()
204
- init_actionmode()
205
205
206
206
; create Ignore windows group from | separated values
207
207
loop , parse , ignoreWindows,|
@@ -291,8 +291,7 @@ paste:
291
291
292
292
if ! IScurCBACTIVE ; if the current clipboard is not asked for , then only load from file
293
293
try FileRead , Clipboard , * c %A_WorkingDir %/ %CLIPS_dir%/ %TEMPSAVE%.avc
294
- try temp_clipboard := Clipboard
295
- ; temp_clipboard := CDS[CN.NG][TEMPSAVE]
294
+ try temp_clipboard := Clipboard ; temp_clipboard := CDS[CN.NG][TEMPSAVE]
296
295
297
296
fixStatus := fixCheck()
298
297
realclipno := CURSAVE - TEMPSAVE + 1
@@ -307,6 +306,8 @@ paste:
307
306
halfClip := halfClip . " `n`n" MSG_MORE_PREVIEW
308
307
}
309
308
else halfClip := temp_clipboard
309
+ if curPisPreviewable
310
+ halfClip := %curPfunction%(halfClip)
310
311
}
311
312
PasteModeTooltip(temp_clipboard)
312
313
SetTimer , ctrlCheck, 50
@@ -451,7 +452,6 @@ moveBack:
451
452
IScurCBACTIVE := 0 ; the key will be always pressed after V
452
453
try FileRead , clipboard , * c %CLIPS_dir%/ %TEMPSAVE%.avc
453
454
try temp_clipboard := Clipboard
454
- ; temp_clipboard := CDS[CN.NG][TEMPSAVE]
455
455
456
456
fixStatus := fixCheck()
457
457
realClipNo := CURSAVE - TEMPSAVE + 1
@@ -465,6 +465,8 @@ moveBack:
465
465
halfClip := halfClip " `n`n" MSG_MORE_PREVIEW
466
466
}
467
467
else halfClip := temp_clipboard
468
+ IF curPisPreviewable
469
+ halfClip := %curPfunction%(halfClip)
468
470
}
469
471
PasteModeTooltip(temp_clipboard)
470
472
SetTimer , ctrlCheck, 50
@@ -481,13 +483,30 @@ IN_BACK_correction(){ ; corrects TEMPSAVE value when C (backwards) is used in p
481
483
482
484
; -------------- paste mode tips ------------------------
483
485
486
+ multiPaste :
487
+ if SPM.ACTIVE {
488
+ WinHide , Clipjump_SPM ahk_class AutoHotkeyGUI
489
+ WinWaitNotActive , Clipjump_SPM ahk_class AutoHotkeyGUI
490
+ temp_spmWasActive := 1
491
+ }
492
+ MULTIPASTE := PASTEMODE_ACT := 1
493
+ while PASTEMODE_ACT
494
+ sleep 50 ; wait till ctrlCheck: runs
495
+ if MULTIPASTE ; if multipaste is still ON, becomes OFF due to release of ctrl (which doesnt disturb when spm is active)
496
+ gosub paste
497
+ if temp_spmWasActive {
498
+ WinShow , Clipjump_SPM ahk_class AutoHotkeyGUI
499
+ temp_spmWasActive := 0
500
+ }
501
+ return
502
+
484
503
cancel :
485
504
Gui , Hide
486
505
PasteModeTooltip(TXT.TIP_cancelm " `t(1)`n" TXT.TIP_modem, 1 )
487
506
ctrlref := " cancel"
488
507
if SPM.ACTIVE
489
508
gosub SPM_dispose ; dispose it if There - Note that this step ends the label as ctrlCheck dies so ctrlRef is kept upwards to be updated
490
- hkZ(pastemodekey.c, " moveback" , 0 )
509
+ hkZ(pastemodekey.c, " moveback" , 0 ) , hkZ(pastemodekey. enter , " multiPaste " , 0 )
491
510
hkZ(pastemodekey.space , " fixate" , 0 ) , hkZ(pastemodekey.z, " Formatting" , 0 ) , hkZ(pastemodekey.a, " navigate_to_first" , 0 )
492
511
hkZ(pastemodekey.s, " Ssuspnd" , 0 ) , hkZ(pastemodekey.up , " channel_up" , 0 ) , hkZ(pastemodekey.down , " channel_down" , 0 )
493
512
hkZ(pastemodekey.f, " searchpm" , 0 ) , hkZ(pastemodekey.h, " editclip" , 0 ) , hkZ(pastemodekey.x, " Cancel" , 0 ) , hkZ(pastemodekey.x, " Delete" , 1 )
@@ -555,9 +574,33 @@ ctrlForCopy:
555
574
return
556
575
557
576
Formatting :
558
- FORMATTING := ! FORMATTING
577
+ matched_pformat := 0
578
+ if curPformat=
579
+ matched_pformat := 1
580
+ for key,value in PLUGINS[" pformat" ]
581
+ {
582
+ if matched_pformat {
583
+ curPformat := value.name , curPfunction := value[" *" ] , matched_pformat := 0
584
+ break
585
+ }
586
+ if ( value[" name" ] == curPformat )
587
+ matched_pformat := 1
588
+ }
589
+ ; rebuild show text
590
+ if temp_clipboard ! = ""
591
+ {
592
+ If strlen (temp_clipboard) > 200
593
+ {
594
+ StringLeft ,halfclip,temp_clipboard, 200
595
+ halfClip := halfClip . " `n`n" MSG_MORE_PREVIEW
596
+ }
597
+ else halfClip := temp_clipboard
598
+ }
599
+ if matched_pformat
600
+ curPformat := "" , FORMATTING := 1 , curPisPreviewable := 0 ; case of switching to default
601
+ else halfClip := (curPisPreviewable := value[" Previewable" ]) ? %curPfunction%(halfClip) : halfClip , FORMATTING := 0
559
602
if ctrlRef = pastemode
560
- PasteModeTooltip(temp_clipboard)
603
+ PasteModeTooltip(temp_clipboard) ; rebuild prvw
561
604
return
562
605
563
606
fixate :
@@ -668,21 +711,23 @@ PasteModeTooltip(cText, notpaste=0) {
668
711
if cText =
669
712
ToolTip % " {" CN.Name " } Clip " realclipno " of " CURSAVE " `t" fixStatus (WinExist (" Display_Cj" ) ? "" : " `n`n" MSG_ERROR " `n`n" ), % SPM.X, % SPM.Y
670
713
else
671
- ToolTip % " {" CN.Name " } Clip " realclipno " of " CURSAVE " `t" GetClipboardFormat() " `t" fixstatus (! FORMATTING ? " `t[" TXT.TIP_noformatting " ]" : "" )
714
+ ToolTip % " {" CN.Name " } Clip " realclipno " of " CURSAVE " `t" GetClipboardFormat() " `t" fixstatus ( curPformat ? " `t[" curPformat " ]" : "" )
672
715
. " `n`n" halfclip, % SPM.X, % SPM.Y
673
716
}
674
717
}
675
718
676
-
677
719
ctrlCheck :
678
- if (! GetKeyState (" Ctrl" )) && (! SPM.ACTIVE)
720
+ if (( ! GetKeyState (" Ctrl" )) && (! SPM.ACTIVE)) || PASTEMODE_ACT
679
721
{
680
722
Critical
681
723
SetTimer , ctrlCheck, Off
682
- CALLER := false , sleeptime := 300
683
- TEMPSAVE := realActive ; keep the current clip pos saved
684
-
724
+ CALLER := false , sleeptime := 300 , TEMPSAVE := realActive ; keep the current clip pos saved
685
725
Gui , 1 :Hide
726
+ ; Change vars a/c MULTIPASTE
727
+ if MULTIPASTE && ! GetKeyState (" Ctrl" ) && ! temp_spmWasActive ; if spmIsActive user is not expected to cancel by releasing Ctrl
728
+ if ctrlRef = pastemode
729
+ ctrlRef := " cancel"
730
+ ; ---
686
731
if ctrlRef = cancel
687
732
{
688
733
ToolTip , %MSG_CANCELLED%
@@ -727,17 +772,17 @@ ctrlCheck:
727
772
else if ctrlRef = pastemode
728
773
{
729
774
ToolTip , %MSG_PASTING%
730
- if ! FORMATTING
775
+ if curPformat ; use curpf to get the func
731
776
{
732
- if Instr (GetClipboardFormat(), " Text " )
733
- {
734
- Critical , Off ; off to enable thread overlap
735
- API.blockMonitoring( 1 )
736
- try Clipboard := Rtrim ( Clipboard , " `r`n " )
737
- API.blockMonitoring( 0 , 5 )
738
- CALLER := 0 ; make it 0 again to avoid any interference with apps like Excel
739
- Critical , On ; on critical for just the case
740
- }
777
+ Critical , Off
778
+ API.blockMonitoring( 1 ) ; this is done to have the boomerang effect ONCLIPBOARD work.
779
+ STORE.ClipboardChanged := 0
780
+ try Coutput := %curPfunction%( Clipboard )
781
+ if STORE.ClipboardChanged
782
+ try Clipboard := Coutput
783
+ else ONCLIPBOARD := 1
784
+ API.blockMonitoring( 0 , 5 )
785
+ Critical , On
741
786
Send , ^ {vk56}
742
787
sleeptime := 1
743
788
}
@@ -762,7 +807,9 @@ ctrlCheck:
762
807
sleep % sleeptime
763
808
Tooltip
764
809
765
- restoreCaller := 0 ; make it 0 in case Clipboard was not touched (Pasting was done)
810
+ restoreCaller := PASTEMODE_ACT := 0 ; restoreCaller - make it 0 in case Clipboard was not touched (Pasting was done)
811
+ if ! GetKeyState (" Ctrl" ) && ! SPM.ACTIVE
812
+ MULTIPASTE := 0 ; deactivated when Ctrl released
766
813
ctrlRef := ""
767
814
CALLER := CALLER_STATUS , EmptyMem()
768
815
}
@@ -797,7 +844,7 @@ hkZ_pasteMode(mode=0){
797
844
hkZ(pastemodekey.c, " MoveBack" , mode) , hkZ(pastemodekey.x, " Cancel" , mode) , hkZ(pastemodekey.z, " Formatting" , mode)
798
845
hkZ(pastemodekey.space , " Fixate" , mode) , hkZ(pastemodekey.s, " Ssuspnd" , mode) , hkZ(pastemodekey.e, " export" , mode)
799
846
hkZ(pastemodekey.up , " channel_up" , mode) , hkZ(pastemodekey.down , " channel_down" , mode) , hkZ(pastemodekey.a, " navigate_to_first" , mode)
800
- hkZ(pastemodekey.f, " searchpm" , mode) , hkZ(pastemodekey.h, " editclip" , mode)
847
+ hkZ(pastemodekey.f, " searchpm" , mode) , hkZ(pastemodekey.h, " editclip" , mode) , hkZ(pastemodekey. enter , " multiPaste " , mode)
801
848
802
849
if ! mode ; init Cj
803
850
{
@@ -808,17 +855,10 @@ hkZ_pasteMode(mode=0){
808
855
}
809
856
}
810
857
811
- ; changeCDS(nc, nx, ){
812
- ; if nc=
813
- ; nc := oc
814
- ; CDS[nc][nx] := CDS[oc][ox]
815
- ; CDS[nc][nx "f"] := CDS[oc][ox "f"]
816
- ; }
817
-
818
858
; --------------------------- CHANNEL FUNCTIONS ----------------------------------------------------------------
819
859
820
860
channel_up :
821
- CN.NG + = 2 ; +2 to counter that -1 below
861
+ CN.NG + = 2
822
862
channel_down :
823
863
CN.NG - = 1 , correctTEMPSAVE()
824
864
if Instr (CN.NG, " -" )
@@ -961,49 +1001,42 @@ historyCleanup()
961
1001
962
1002
963
1003
actionmode :
1004
+ update_actionmode()
964
1005
temp_am := TT_Console(ACTIONMODE.text, ACTIONMODE.keys, temp3, temp3, 5 , " s8" , " Consolas|Courier New" )
965
- if ACTIONMODE[temp_am] ! = ""
966
- gosub % ACTIONMODE[temp_am]
1006
+ if ACTIONMODE[temp_am] ! = " Exit_actmd"
1007
+ if Instr (ACTIONMODE[temp_am] , " (" )
1008
+ RunFunc(ACTIONMODE[temp_am])
1009
+ else gosub % ACTIONMODE[temp_am]
967
1010
else
968
1011
EmptyMem()
969
1012
return
970
1013
971
1014
init_actionmode () {
972
- ; ini_actmd_keys stores user prefs till Help File
973
-
974
- t12 := {}
975
- loop , parse , ini_actmd_keys, %A_space %, %A_space %
976
- t12.Insert (A_LoopField )
977
-
978
- ACTIONMODE := {(t12.1 ): " history" , (t12.2 ): " channelGUI" , (t12.3 ): " copyfile" , (t12.4 ): " copyfolder" , (t12.5 ): " CopyFileData" , (t12.6 ): " disable_clipjump"
979
- , (t12.7 ): " pitswap" , (t12.8 ): " onetime" , (t12.9 ): " settings" , (t12.10 ): " hlp" , (t12.11 ): " classTool" }
980
-
981
- ACTIONMODE.keys := ini_actmd_keys " Esc End Q"
982
-
983
- status_text := ! CLIPJUMP_STATUS ? TXT.ACT_enable : TXT.ACT_disable ; 8
1015
+ ACTIONMODE := {H: " history" , S: " channelGUI" , C: " copyfile" , X: " copyfolder" , F: " CopyFileData" , D: " disable_clipjump"
1016
+ , P: " pitswap" , O: " onetime" , L: " classTool" , E: " settings" , F1 : " hlp" , Esc : " Exit_actmd" , M: " pluginManager_GUI()"
1017
+ , H_caption: TXT.HST__name, S_caption: TXT.CNL__name, C_caption: TXT._cfilep, X_caption: TXT._cfolderp, F_caption: cfiled
1018
+ , D_caption: TXT.ACT_disable " " PROGNAME, P_caption: TXT._pitswp, O_caption: TXT._ot, L_caption: TXT.IGN__name, E_caption: TXT.SET__name
1019
+ , F1_caption: TXT.TRY_help, Esc_caption: TXT.ACT_exit, M_caption: TXT.PLG__name}
1020
+ }
984
1021
985
- ; auto-detect width
986
- ; max 35
987
- ACTIONMODE.text := ""
1022
+ update_actionmode (){
1023
+ thetext := ""
988
1024
. PROGNAME " " TXT.ACT__name
989
1025
. " `n-----------"
990
1026
. " `n"
991
- . " `n" fillwithSpaces(TXT.HST__name, 35 ) " - " t12.1 ; 35 is default
992
- . " `n" fillwithSpaces(TXT.CNL__name) " - " t12.2
993
- . " `n" fillwithSpaces(TXT._cfilep) " - " t12.3
994
- . " `n" fillwithSpaces(TXT._cfolderp) " - " t12.4
995
- . " `n" fillwithSpaces(TXT._cfiled) " - " t12.5
996
- . " `n" fillwithSpaces(status_text " " PROGNAME) " - " t12.6
997
- . " `n" fillwithSpaces(TXT._pitswp) " - " t12.7
998
- . " `n" fillwithSpaces(TXT._ot) " - " t12.8
999
- . " `n"
1000
- . " `n" fillwithSpaces(TXT.IGN__name) " - " t12.11
1001
- . " `n" fillwithSpaces(TXT.SET__name) " - " t12.9
1002
- . " `n" fillwithSpaces(TXT.TRY_help) " - " t12.10
1003
- . " `n"
1004
- . " `n" fillwithSpaces(TXT.ACT_exit) " - Esc, End, Q"
1027
+ ACTIONMODE.remove (" text" ) , ACTIONMODE.remove (" keys" )
1005
1028
1029
+ for k,v in ACTIONMODE
1030
+ if ! Instr (k, " _" ) && (k ! = " Esc" ) && v{
1031
+ thekeys .= k " "
1032
+ thetext .= " `n" fillwithSpaces( ACTIONMODE[k " _caption" ] ? ACTIONMODE[k " _caption" ] : v , 35 ) " - " k
1033
+ }
1034
+ if ACTIONMODE.Esc
1035
+ thetext .= " `n`n" fillwithSpaces( ACTIONMODE.Esc_caption ? ACTIONMODE.Esc_caption : ACTIONMODE.Esc , 35 ) " - Esc" , thekeys .= " Esc"
1036
+ ACTIONMODE.keys := Trim (thekeys)
1037
+ ACTIONMODE.text := thetext
1006
1038
}
1039
+
1007
1040
; ****************COPY FILE/FOLDER/DATA***************************************************************************
1008
1041
1009
1042
copyFile :
@@ -1223,7 +1256,7 @@ disable_clipjump:
1223
1256
1224
1257
routines_Exit () {
1225
1258
Ini_write(" Clipboard_history_window" , " partial" , history_partial, 0 )
1226
- ; updatePluginList () - ;ENABLE WHEN PLUGINS ARE INCORPORATED
1259
+ updatePluginIncludes () - ; ENABLE WHEN PLUGINS ARE INCORPORATED
1227
1260
}
1228
1261
1229
1262
; #################### COMMUNICATION ##########################################
@@ -1318,7 +1351,7 @@ Receive_WM_COPYDATA(wParam, lParam)
1318
1351
#include %A_ScriptDir%\lib\anticj_func_labels.ahk
1319
1352
#include %A_ScriptDir%\lib\settings gui plug.ahk
1320
1353
#include %A_ScriptDir%\lib\history gui plug.ahk
1321
- ; #include %A_ScriptDir%\lib\pluginManager.ahk
1322
- ; #include %A_ScriptDir%\plugins\_registry.ahk
1354
+ #include %A_ScriptDir%\lib\pluginManager.ahk
1355
+ #include %A_ScriptDir%\plugins\_registry.ahk
1323
1356
1324
1357
; ------------------------------------------------------------------- X -------------------------------------------------------------------------------
0 commit comments