-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathAHK-ToolKit.ahk
executable file
·4817 lines (4216 loc) · 193 KB
/
AHK-ToolKit.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* =============================================================================================== *
* Author : RaptorX <[email protected]>
* Script Name : AutoHotkey ToolKit (AHK-ToolKit)
* Script Version : 0.8.1.1
* Homepage : http://www.autohotkey.com/forum/topic61379.html#376087
*
* Creation Date : July 11, 2010
* Modification Date: October 14, 2012
*
* Description :
* ------------------
* This small program is a set of "tools" that i use regularly.
*
* A convenient GUI that serves as a hotkey and hotstring manager allows you to keep all of them
* in an easy to read list.
*
* The Live Code tab allows you to quickly test ahk code without having to save a file even if
* Autohotkey is not installed in the computer you are using.
* Also there are other tools like the Command Detector and the Screen and Forum Tools that improve
* the way i help other people while in IRC and ahk Forums.
*
* I hope other people find it useful. You can modify it and improve it as you like. Feel free
* to contact me if you want your changes to be added in the official release.
*
* -----------------------------------------------------------------------------------------------
* License : Copyright ©2010-2012 RaptorX <GPLv3>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/gpl-3.0.txt>
* -----------------------------------------------------------------------------------------------
*
* [GUI Number Index]
*
* GUI 01 - First Time Run / AutoHotkey ToolKit [MAIN GUI]
* GUI 02 - Add Hotkey
* GUI 03 - Add Hotstring
* GUI 04 - Import Hotkeys/Hotstrings
* GUI 05 - Export Hotkeys/Hotstrings
* GUI 06 - Preferences
* GUI 07 - Add Snippet
* GUI 08 - About
* GUI 09 - Paste Upload
* GUI 92 - Command Helper Options
* GUI 93 - Command Helper
* GUI 94 - Code Detection Popup
* GUI 95 - Code Detection Pastebin Preferences
* GUI 96 - Code Detection Keywords Preferences
* GUI 97 - Code Detection Preferences
* GUI 98 - General Preferences
* GUI 99 - Splash Window / Screen Tool Area Selection
*
* =============================================================================================== *
*/
if (a_ahkversion < 1.1){
Msgbox, 0x10
, % "Error"
, % "The AutoHotkey installed in your computer is not compatible with`n"
. "this version of AutoHotkey Toolkit.`n`n"
. "Please use the compiled version of my script or upgrade to AutoHotkey L.`n"
. "The application will exit now."
Exitapp
}
;[Includes]{
#include <sc>
#include <sci>
#include <hash>
#include <klist>
#include <attach>
#include <hkSwap>
#include <uriSwap>
#include <scriptobj>
#include <htmlhelp>
#include <httprequest>
;}
;[Directives]{
#NoEnv
#SingleInstance Force
; --
SendMode, Input
SetBatchLines, -1
SetTitleMatchMode, RegEx
CoordMode, Caret, Screen
CoordMode, Tooltip, Screen
SetWorkingDir, %a_scriptdir%
OnExit, Exit
; --
GroupAdd, ScreenTools, ahk_class SWarClass
GroupAdd, ScreenTools, ahk_class Photoshop
GroupAdd, ScreenTools, ahk_class illustrator
GroupAdd, ScreenTools, ahk_class 3DSMAX
GroupAdd, ScreenTools, ahk_class AE_CApplication_9.0
;}
;[Basic Script Info]{
Clipboard := null
global script := { base : scriptobj
,name : "AHK-ToolKit"
,version : "0.8.1.1"
,author : "RaptorX"
,email : "[email protected]"
,homepage : "http://www.autohotkey.com/forum/topic61379.html#376087"
,crtdate : "July 11, 2010"
,moddate : "October 14, 2012"
,conf : "conf.xml"}
script.getparams(), ForumMenu(), TrayMenu() ; These function are here so that
; the Tray Icon is shown early
; and forum menus are ready.
;}
;[User Configuration]{
; Trying to fix the issues that result from the script not being run as admin under Win7/Vista
if (!a_isadmin){
If a_iscompiled
DllCall(ShellExecute,"Uint", 0
, "Str", "RunAs"
, "Str", a_scriptfullpath
, "Str", params
, "Str", a_workingdir
,"Uint", 1)
Else
DllCall(ShellExecute,"Uint", 0
, "Str", "RunAs"
, "Str", a_ahkpath
, "Str", """" a_scriptfullpath """" a_space params
, "Str", a_workingdir
,"Uint", 1)
}
global system := {}, sci := {} ; Scintilla array
global conf := ComObjCreate("MSXML2.DOMDocument"), xsl := ComObjCreate("MSXML2.DOMDocument"), root, options, hotkeys, hotstrings
system.mon := {}, system.wa := {}
RegRead,defBrowser,HKCR,.html ; Get default browswer
RegRead,defBrowser,HKCR,%defBrowser%\Shell\Open\Command ; Get path to default browser + options
SysGet, mon, Monitor ; Get the boundaries of the current screen
SysGet, wa, MonitorWorkArea ; Get the working area of the current screen
system.defBrowser := defBrowser
system.mon.left := monLEFT, system.mon.right := monRIGHT, system.mon.top := monTOP, system.mon.bottom := monBOTTOM
system.wa.left := waLEFT, system.wa.right := waRIGHT, system.wa.top := waTOP, system.wa.bottom := waBOTTOM
;--
; Cleaning
defBrowser:=monLEFT:=monRIGHT:=monTOP:=monBOTTOM:=waLEFT:=waRIGHT:=waTOP:=waBOTTOM:=null ; Set all to null
;--
; Configuration file objects
style = ;{
(
<!-- Extracted from: http://www.dpawson.co.uk/xsl/sect2/pretty.html (v2) -->
<!-- Cdata info from: http://www.altova.com/forum/default.aspx?g=posts&t=1000002342 -->
<!-- Modified By RaptorX -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"
indent="yes"
encoding="UTF-8"/>
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="comment()|processing-instruction()">
<xsl:copy />
</xsl:template>
</xsl:stylesheet>
<!-- I have to keep the indentation here in this file as i want it to be on the XML file -->
)
;}
xsl.loadXML(style), style:=null
if !conf.load(script.conf)
{
if FileExist(script.conf)
{
Msgbox, 0x14
, % "Error while reading the configuration file."
, % "The configuration file is corrupt.`n"
. "Do you want to load the default configuration file?`n`n"
. "Note: `n"
. "You will lose any saved hotkeys/hotstrings and all other personal data by this operation.`n"
. "Choose No to abort the operation and try to recover the file manually."
IfMsgBox Yes
{
defConf(script.conf)
Msgbox, 0x40
, % "Operation Completed"
, % "The default configuration file was successfully created. The script will reload."
Reload
Pause ; Fixes the problem of the Main Gui flashing because of being created before
; the Reload is really performed.
}
IfMsgBox No
ExitApp
}
else
FirstRun()
} root:=conf.documentElement,options:=root.firstChild,hotkeys:=options.nextSibling,hotstrings:=hotkeys.nextSibling
node := root.attributes.item[0]
node.text != script.version ? (node.text := script.version, conf.save(script.conf)
, conf.load(script.conf), node:=null) : null
;}
;[Main]{
script.autostart(options.selectSingleNode("//@sww").text)
options.selectSingleNode("//@ssi").text ? script.splash("res\img\AHK-TK_Splash.png") : null
CreateGui() ; Creating GUI before checking for updates for avoiding the GUI not showing up because an update check was in progress
options.selectSingleNode("//@cfu").text ? script.update(script.version) : null
Return ; [End of Auto-Execute area]
;}
;[Labels]{
GuiHandler: ;{
GuiHandler()
return
;}
MenuHandler: ;{
MenuHandler()
return
;}
ListHandler: ;{
ListHandler()
return
;}
HotkeyHandler: ;{
HotkeyHandler(a_thishotkey)
return
;}
GuiSize: ;{
4GuiSize:
if (a_gui = 1)
{
_lists := "hkList|shkList|hsList|shsList"
_guiwidth := a_guiwidth, _guiheight:= a_guiheight
SB_SetParts(150,150,a_guiwidth-378,50)
Loop, Parse, _lists, |
{
Gui, 01: ListView, % a_loopfield
if (a_loopfield = "hkList" || a_loopfield = "shkList")
LV_ModifyCol(2, "Center"), LV_ModifyCol(3, "Center")
Loop, 4
LV_ModifyCol(a_index, "AutoHdr")
}
if (a_eventinfo = 1)
{
main_toggle := !main_toggle
Gui, 01: Hide
}
}
if a_gui = 4
{
Gui, 04: ListView, imList
LV_ModifyCol(5, "AutoHdr")
}
return
;}
OnClipboardChange: ;{
Critical
conf.load(script.conf), root:=conf.documentElement, options:=root.firstChild
if options.selectSingleNode("//Codet/@status").text
{
if (Clipboard = oldScript)
return
oldScript:=Clipboard, kword_cnt:=0
kwords := options.selectSingleNode("//Codet/Keywords").text ; load every time because it might have
; changed recently
Loop, Parse, kwords, %a_space%
if RegexMatch(Clipboard, "i)\b" a_loopfield "\b\(?")
kword_cnt++
if (kword_cnt >= options.selectSingleNode("//Codet/Keywords/@min").text)
{
kword_cnt:=0
if (options.selectSingleNode("//Codet/@mode").text = 2)
pasteUpload("auto")
else
pasteUpload("show")
}
}
return
;}
; Special Labels
OpenHelpFile: ;{
oldclip := ClipboardAll
Send, {Ctrl Down}{left}+{right}c{CtrlUp}
ClipWait
htmlhelp(hwnd, regexreplace(a_ahkpath, "exe$", "chm"), clipboard)
Clipboard := oldclip
return
;}
ForumTags: ;{
oldclip := ClipboardAll
Send, {Ctrl Down}{left}+{right}c{CtrlUp}
ClipWait
htmlhelp("ForumHelper", regexreplace(a_ahkpath, "exe$", "chm"), clipboard)
Clipboard := oldclip
return
;}
Exit:
Process,Close, %hslPID%
if FileExist(a_temp "\ahkl.bak")
FileDelete, %a_temp%\ahkl.bak
if FileExist(a_temp "\*.code")
Loop, % a_temp "\*.code"
FileDelete, %a_loopfilefullpath%
ExitApp
;}
;[Functions]{
; Gui related functions
FirstRun(){
global
Gui, +DelimiterSpace
Gui, add, GroupBox, y5 w345 h95, % "General Preferences"
Gui, add, Text, xp+10 yp+20 w325, % "This is the first time you are running " script.name ".`n"
. "Here you can set some general options for the program.`n`n"
. "You can change them at any time later on by going to the `n""Settings >"
. " Preferences"" Menu."
Gui, add, GroupBox, x10 y+15 w345 h70, % "Startup"
Gui, add, CheckBox, xp+25 yp+20 Checked v_ssi, % "Show splash image"
Gui, add, CheckBox, x+70 Checked v_sww, % "Start with Windows"
Gui, add, CheckBox, x35 y+10 Checked v_smm, % "Start minimized"
Gui, add, CheckBox, x+91 Checked v_cfu, % "Check for updates"
Gui, add, GroupBox, x10 y+20 w345 h55, % "Main GUI Hotkey"
Gui, add, DropDownList, xp+10 yp+20 w140 HWND$hkddl v_hkddl, % lst := "None " klist("all^", "mods msb")
SetHotkeys(lst,$hkddl, "First Run")
Gui, add, CheckBox, x+10 yp+3 v_ctrl, % "Ctrl"
Gui, add, CheckBox, x+10 v_alt, % "Alt"
Gui, add, CheckBox, x+10 v_shift, % "Shift"
Gui, add, CheckBox, x+10 v_win, % "Win"
Gui, add, GroupBox, x10 y+26 w345 h70, % "Other Tools"
Gui, add, CheckBox, xp+15 yp+20 Checked v_ecd, % "Enable Code Detection"
Gui, add, CheckBox, x+60 Checked v_ech, % "Enable Command Helper"
Gui, add, CheckBox, x25 y+10 Checked v_eft, % "Enable Forum Tag-AutoComplete"
Gui, add, CheckBox, x+14 Checked v_est, % "Enable Screen Tools"
Gui, add, Text, x20 y+30 w325
, % "Note:`n"
. "The default hotkey is Win + `` (Win key + Back tic)"
Gui, add, Text, x0 y+10 w370 0x10
Gui, add, Button, xp+280 yp+10 w75 gGuiHandler, % "&Save"
Gui, show, w365 h405, % "First Run"
Pause
}
TrayMenu(){
Menu, Tray, Icon, res/AHK-TK.ico
Menu, Tray, Tip, % script.name " v" script.version " [" (a_isunicode ? "W" : "A") "]"
Menu, Tray, NoStandard
Menu, Tray, Click, 1
Menu, Tray, add, % "Show Main Gui", GuiClose
Menu, Tray, Default, % "Show Main Gui"
Menu, Tray, add
Menu, Tray, Standard
}
MainMenu(){
conf.load(script.conf), root:=conf.documentElement,options:=root.firstChild
Menu, iexport, add, Import Hotkeys/Hotstrings, MenuHandler
Menu, iexport, add
Menu, iexport, add, Export Hotkeys/Hotstrings, MenuHandler
Menu, File, add, &New`t(Ctrl+N), MenuHandler
Menu, File, add, Delete`t(DEL), MenuHandler
Menu, File, add
Menu, File, add, &Open`t(Ctrl+O), MenuHandler
Menu, File, disable, &Open`t(Ctrl+O)
Menu, File, add, &Save`t(Ctrl+S), MenuHandler
Menu, File, disable, &Save`t(Ctrl+S)
Menu, File, add, Save As`t(Ctrl+Shift+S), MenuHandler
Menu, File, disable, Save As`t(Ctrl+Shift+S)
Menu, File, add
Menu, File, add, Import/Export, :iexport
Menu, File, add
Menu, File, add, Exit, Exit
Menu, LO, add, Duplicate Line`t(Ctrl+D), MenuHandler
Menu, LO, add, Split Lines`t(Ctrl+I), MenuHandler
Menu, LO, add, Join Lines`t(Ctrl+J), MenuHandler
Menu, LO, add, Move up current Line`t(Ctrl+Shift+Up), MenuHandler
Menu, LO, add, Move down current Line`t(Ctrl+Shift+Down), MenuHandler
Menu, Convert Case,add, Convert to Lowercase`t(Ctrl+U), MenuHandler
Menu, Convert Case,add, Convert to Uppercase`t(Ctrl+Shift+U), MenuHandler
Menu, Edit, add, Undo`t(Ctrl+Z), MenuHandler
Menu, Edit, disable, Undo`t(Ctrl+Z)
Menu, Edit, add, Redo`t(Ctrl+Y), MenuHandler
Menu, Edit, disable, Redo`t(Ctrl+Y)
Menu, Edit, add
Menu, Edit, add, Cut`t(Ctrl+X), MenuHandler
Menu, Edit, add, Copy`t(Ctrl+C), MenuHandler
Menu, Edit, add, Paste`t(Ctrl+V), MenuHandler
Menu, Edit, add, Select All`t(Ctrl+A), MenuHandler
Menu, Edit, add
Menu, Edit, add, Convert Case, :Convert Case
Menu, Edit, add, Line Operations, :LO
Menu, Edit, add, Trim Trailing Space`t(Ctrl+Space), MenuHandler
Menu, Edit, add
Menu, Edit, add, Set Read Only, MenuHandler
Menu, Search, add, Find...`t(Ctrl+F), MenuHandler
Menu, Search, add, Find in Files...`t(Ctrl+Shift+F), MenuHandler
Menu, Search, add, Find Next...`t(F3), MenuHandler
Menu, Search, add, Find Previous...`t(Shift+F3), MenuHandler
Menu, Search, add, Find && Replace`t(Ctrl+H), MenuHandler
Menu, Search, add, Go to Line`t(Ctrl+G), MenuHandler
Menu, Search, add, Go to Matching Brace`t(Ctrl+B), MenuHandler
Menu, Search, disable, Go to Matching Brace`t(Ctrl+B)
Menu, Symbols, add, Show Spaces and TAB, MenuHandler
Menu, Symbols, add, Show End Of Line, MenuHandler
Menu, Symbols, add, Show All Characters, MenuHandler
Menu, Zoom, add, Zoom in`t(Ctrl+Numpad +), MenuHandler
Menu, Zoom, add, Zoom out`t(Ctrl+Numpad -), MenuHandler
Menu, Zoom, add, Default Zoom`t(Ctrl+=), MenuHandler
Menu, View, add, Always On Top, MenuHandler
Menu, View, add, Snippet Library, MenuHandler
Menu, View, disable, Snippet Library
Menu, View, add
Menu, View, add, Show Symbols, :Symbols
Menu, View, disable, Show Symbols
Menu, View, add, Zoom, :Zoom
Menu, View, disable, Zoom
Menu, View, add, Line Wrap, MenuHandler
Menu, View, disable, Line Wrap
Menu, RCW, add, L-Ansi, MenuHandler
Menu, RCW, add, L-Unicode, MenuHandler
Menu, RCW, add, Basic, MenuHandler
Menu, RCW, add, IronAHK, MenuHandler
Menu, Settings, add, Run Code With, :RCW
Menu, Settings, disable, Run Code With
Menu, Settings, add, Enable Command Helper, MenuHandler
Menu, Settings, disable, Enable Command Helper
Menu, Settings, add, Context Menu Options, MenuHandler
Menu, Settings, disable, Context Menu Options
Menu, Settings, add
Menu, Settings, add, &Preferences`t(Ctrl+P), MenuHandler
Menu, Help, add, Help, MenuHandler
Menu, Help, disable, Help
Menu, Help, add, Documentation, MenuHandler
Menu, Help, disable, Documentation
Menu, Help, add, Check for Updates, MenuHandler
Menu, Help, add
Menu, Help, add, About, MenuHandler
Menu, MainMenu, add, File, :File
Menu, MainMenu, add, Edit, :Edit
Menu, MainMenu, disable, Edit
Menu, MainMenu, add, Search, :Search
Menu, MainMenu, disable, Search
Menu, MainMenu, add, View, :View
Menu, MainMenu, add, Settings, :Settings
Menu, MainMenu, add, Help, :Help
rcwSet()
if root.selectSingleNode("//@alwaysontop").text
Menu, View, check, Always On Top
if options.selectSingleNode("//@snplib").text
Menu, View, check, Snippet Library
if options.selectSingleNode("//@linewrap").text
Menu, View, check, Line Wrap
if options.selectSingleNode("//@sci").text
Menu, Settings, check, Enable Command Helper
return
}
ForumMenu(){
Menu, Color, Add, Custom, MenuHandler
Menu, Color, Add, Dark Red, MenuHandler
Menu, Color, Add, Red, MenuHandler
Menu, Color, Add, Orange, MenuHandler
Menu, Color, Add, Brown, MenuHandler
Menu, Color, Add, Yellow, MenuHandler
Menu, Color, Add, Green, MenuHandler
Menu, Color, Add, Olive, MenuHandler
Menu, Color, Add, Cyan, MenuHandler
Menu, Color, Add, Blue, MenuHandler
Menu, Color, Add, Dark Blue, MenuHandler
Menu, Color, Add, Indigo, MenuHandler
Menu, Color, Add, Violet, MenuHandler
Menu, Color, Add, White, MenuHandler
Menu, Color, Add, Black, MenuHandler
Menu, Size, Add, Custom, MenuHandler
Menu, Size, Add, Tiny, MenuHandler
Menu, Size, Add, Small, MenuHandler
Menu, Size, Add, Normal, MenuHandler
Menu, Size, Add, Large, MenuHandler
Menu, Size, Add, Huge, MenuHandler
}
SnippetMenu(){
global
Menu, Snippet, add, New, MenuHandler
Menu, Snippet, add
Menu, Snippet, add, Edit, MenuHandler
Menu, Snippet, add, Rename, MenuHandler
; Menu, Snippet, add
Menu, Snippet, add, Delete, MenuHandler
return
}
CreateGui(){
global $hwnd1
MainGui(), AddHKGui(), AddHSGui(), ImportGui(), ExportGui(), PreferencesGui()
SnippetGui(), AboutGui(), PasteUploadGui(), CodetPopup(), AreaSlectionGui(), SetHotkeys("main", $hwnd1)
SetSciStyles()
return
}
MainGui(){
global
OnMessage(WM("COMMAND"),"MsgHandler")
_aot := (root.attributes.item[1].text ? "+" : "-") "AlwaysOnTop"
Gui, 01: +LastFound +Resize +MinSize650x300 %_aot%
$hwnd1 := WinExist(), MainMenu(), _aot:=null
tabLast := "Hotkeys" ; Helps when deleting an item on the Hotkeys tab, before actually clicking the tabs.
Gui, 01: menu, MainMenu
Gui, 01: add, Tab2, x0 y0 w800 h400 HWND$tabcont gGuiHandler vtabLast, % "Hotkeys|Hotstrings|Live Code"
Gui, 01: add, StatusBar, HWND$StatBar
updateSB()
_cnt := root.selectSingleNode("//Hotkeys/@count").text
Gui, 01: tab, Hotkeys
Gui, 01: add, ListView, w780 h315 HWND$hkList Count%_cnt% Sort Grid AltSubmit gListHandler vhkList
, % "Type|Program Name|Hotkey|Program Path / Script Preview"
Gui, 01: add, ListView, w780 h315 xp yp HWND$shkList Count%_cnt% Sort Grid AltSubmit gListHandler vshkList
, % "Type|Program Name|Hotkey|Program Path"
GuiControl, hide, shkList
Load("Hotkeys")
Gui, 01: add, Text, x0 y350 w820 0x10 HWND$hkDelim
Gui, 01: font, s8 cGray italic, Verdana
Gui, 01: add, Edit, x10 yp+10 w250 HWND$QShk gGuiHandler vQShk, % "Quick Search"
Gui, 01: font
Gui, 01: add, Button, x+370 yp w75 HWND$hkAdd Default gGuiHandler, % "&Add"
Gui, 01: add, Button, x+10 yp w75 HWND$hkClose gGuiHandler, % "&Close"
_cnt := root.selectSingleNode("//Hotstrings/@count").text
Gui, 01: Tab, Hotstrings
Gui, 01: add, ListView, w780 h205 HWND$hsList Count%_cnt% Grid AltSubmit gListHandler vhsList
, % "Type|Options|Abbreviation|Expand To"
Gui, 01: add, ListView, w780 h205 xp yp HWND$shsList Count%_cnt% Grid AltSubmit gListHandler vshsList
, % "Type|Options|Abbreviation|Expand To"
GuiControl, hide, shsList
Gui, 01: add, Groupbox, w780 h105 HWND$hsGbox, % "Quick Add"
Gui, 01: add, Text, xp+100 yp+20 HWND$hsText1, % "Expand:"
Gui, 01: font, s8 cGray italic, Verdana
Gui, 01: add, Edit, x+10 yp-3 w150 HWND$hsExpand vhsExpand, % "e.g. btw"
Gui, 01: font
Gui, 01: add, Text, x+10 yp+3 HWND$hsText2, % "To:"
Gui, 01: font, s8 cGray italic, Verdana
Gui, 01: add, Edit, x+10 yp-3 w250 HWND$hsExpandto vhsExpandto, % "e.g. by the way"
Gui, 01: font
Gui, 01: add, Checkbox, x+10 yp+5 HWND$hsCbox1 vhsIsCode, % "Run as Script"
Gui, 01: add, CheckBox, x112 y+15 HWND$hsCbox2 Checked vhsAE, % "AutoExpand"
Gui, 01: add, CheckBox, xp+235 yp HWND$hsCbox3 vhsDND, % "Do not delete typed abbreviation"
Gui, 01: add, CheckBox, x112 y+10 HWND$hsCbox4 vhsTIOW, % "Trigger inside other words"
Gui, 01: add, CheckBox, xp+235 yp HWND$hsCbox5 vhsSR, % "Send Raw (do not translate {Enter} or {key})"
Load("HotStrings")
Gui, 01: add, Text, x0 y350 w820 0x10 HWND$hsDelim
Gui, 01: font, s8 cGray italic, Verdana
Gui, 01: add, Edit, x10 yp+10 w250 HWND$QShs gGuiHandler vQShs, % "Quick Search"
Gui, 01: font
Gui, 01: add, Button, x+370 yp w75 HWND$hsAdd Default gGuiHandler, % "&Add"
Gui, 01: add, Button, x+10 yp w75 HWND$hsClose gGuiHandler, % "&Close"
Gui, 01: Tab, Live Code
options.selectSingleNode("//@snplib").text ? w:=640 : w:=790
sci[1] := new scintilla($hwnd1,5,25,w,320, "lib", "hidden")
Gui, 01: add, Text, x650 y25 w145 h17 HWND$slTitle Center Border Hidden, % "Snippet Library"
Gui, 01: add, DropDownList, xp y+5 w145 HWND$slDDL Hidden gGuiHandler Sort vslDDL
_current := options.selectSingleNode("//SnippetLib/@current").text
_cnt := options.selectSingleNode("//Group[@name='" _current "']/@count").text
Gui, 01: add, ListView
, w145 h270 HWND$slList -Hdr -ReadOnly Count%_cnt% AltSubmit Sort Grid Hidden gListHandler vslList
, % "Title"
Load("SnpLib")
Gui, 01: add, Text, x0 y350 w820 0x10 HWND$lcDelim
Gui, 01: font, s8 cGray italic, Verdana
Gui, 01: add, Edit, x10 yp+10 w250 Disabled HWND$QSlc gGuiHandler vQSlc, % "Quick Search"
Gui, 01: font
Gui, 01: add, Button, x+370 yp w75 HWND$lcRun gGuiHandler, % "&Run"
Gui, 01: add, Button, x+10 yp w75 HWND$lcClear gGuiHandler, % "&Clear"
GuiAttach(1),SetSciMargin(sci[1])
; The following is used in the message handler to get the ID
; of the edit controls so we can change their font (quick search controls)
WinGet, cList1, ControlList
WinGet, hList1, ControlListHWND
hide := options.selectSingleNode("//@smm").text ? "Hide" : ("", main_toggle:=1)
current:=cnt:=null
; I remove one pixel from w800 to cover the delimiter line on the right side
;
; The attach function redraws the tab on top of the Status bar.
; I made it so that the window is a little bit below the tab to avoid overlapping
; hence the h422.
Gui, 01: show, w799 h422 %hide%, % "AutoHotkey Toolkit [" (a_isunicode ? "W" : "A") "]"
return
}
AddHKGui(){
global
Gui, 02: +LastFound +Resize +MinSize +Owner1 +DelimiterSpace
$hwnd2 := WinExist()
Gui, 02: add, GroupBox, w240 h55, % "Hotkey Name"
Gui, 02: add, Edit, x20 yp+20 w220 HWND$hkName vhkName
Gui, 02: add, GroupBox, xp-10 yp+40 w350 h70, % "Hotkey Type"
Gui, 02: add, Radio, xp+10 yp+20 Checked gGuiHandler vhkType, % "Script"
Gui, 02: add, Radio, x+20 gGuiHandler, % "File"
Gui, 02: add, Radio,x+20 gGuiHandler, % "Folder"
Gui, 02: add, Edit, x20 yp+20 w220 Disabled HWND$hk2Path vhkPath, %a_programfiles%
Gui, 02: add, Button, x+10 w100 Disabled HWND$hk2Browse gGuiHandler, % "&Browse..."
Gui, 02: add, GroupBox, x10 w350 h70, % "Select Hotkey"
Gui, 02: add, CheckBox, xp+10 yp+33 vhkctrl, % "Ctrl"
Gui, 02: add, CheckBox, x+10 vhkalt, % "Alt"
Gui, 02: add, CheckBox, x+10 vhkshift, % "Shift"
Gui, 02: add, CheckBox, x+10 vhkwin, % "Win"
Gui, 02: add, DropDownList, x+10 yp-3 w140 vhkey, % lst := "None " klist("all^", "mods msb")
; SetHotkeys(lst,$hkddl, "Add Hotkey")
Gui, 02: add, GroupBox, x+20 y6 w395 h205, % "Advanced Options"
Gui, 02: add, Text,xp+10 yp+15, % "Note: Comma delimited, case insensitive and accepts RegExs"
Gui, 02: font, s8 cGray italic, Verdana
Gui, 02: add, Edit, w375 HWND$hkIfWin vhkIfWin, % "If window active list (e.g. Winamp, Notepad, Fire.*)"
Gui, 02: add, Edit, wp HWND$hkIfWinN vhkIfWinN
, % "If window NOT active list (e.g. Notepad++, Firefox, post.*\s)"
Gui, 02: font
Gui, 02: add, Checkbox, xp y+5 vhkLMod, % "Left mod: only use left modifier key"
Gui, 02: add, Checkbox, vhkRMod, % "Right mod: only use right modifier key"
Gui, 02: add, Checkbox, vhkWild, % "Wildcard: fire with other keys "
Gui, 02: add, Checkbox, vhkSend, % "Send key to active window"
Gui, 02: add, Checkbox, vhkHook, % "Install hook"
Gui, 02: add, Checkbox, vhkfRel, % "Fire when releasing key"
sci[2] := new scintilla($hwnd2,10,220,750,250,"lib")
Gui, 02: add, Text, x0 y+280 w785 0x10 HWND$hk2Delim
Gui, 02: add, Button, x600 yp+10 w75 HWND$hk2Add Default gGuiHandler, % "&Add"
Gui, 02: add, Button, x+10 yp w75 HWND$hk2Cancel gGuiHandler, % "&Cancel"
GuiAttach(2),SetSciMargin(sci[2])
WinGet, cList2, ControlList
WinGet, hList2, ControlListHWND
Gui, 02: show, w770 h520 Hide, % "Add Hotkey"
return
}
AddHSGui(){
global
Gui, 03: +LastFound +Resize +MinSize +Owner1
$hwnd3 := WinExist()
Gui, 03: add, GroupBox, w180 h55, % "Hotstring Options"
Gui, 03: font, s8 cGray italic, Verdana
Gui, 03: add, Edit, xp+10 yp+20 w70 HWND$hsOpt vhsOpt, % "e.g. rc*"
Gui, 03: font
Gui, 03: add, Checkbox, x+5 yp+3 gGuiHandler vhs2IsCode, % "Run as Script"
Gui, 03: add, GroupBox, x+20 yp-23 w210 h55, % "Expand"
Gui, 03: font, s8 cGray italic, Verdana
Gui, 03: add, Edit, xp+10 yp+20 w190 HWND$hs2Expand vhs2Expand, % "e.g. btw"
Gui, 03: font
Gui, 03: add, GroupBox,x10 y+20 w400 h100, % "Advanced Options"
Gui, 03: add, Text, xp+10 yp+20, % "Note: Comma delimited, case insensitive and accepts RegExs"
Gui, 03: font, s8 cGray italic, Verdana
Gui, 03: add, Edit, w380 HWND$hsIfWin vhsIfWin, % "If window active list (e.g. Winamp, Notepad, Fire.*)"
Gui, 03: add, Edit, wp HWND$hsIfWinN vhsIfWinN
, % "If window NOT active list (e.g. Notepad++, Firefox, post.*\s)"
Gui, 03: font
Gui, 03: add, GroupBox, x10 w400 h300 HWND$hs2GBox, % "Expand to"
sci[3] := new scintilla($hwnd3,20,195,380,265,"lib")
Gui, 03: add, Text, x0 y+10 w440 0x10 HWND$hs2Delim
Gui, 03: add, Button, xp+250 yp+10 w75 Default HWND$hs2Add gGuiHandler, % "&Add"
Gui, 03: add, Button, x+10 yp w75 HWND$hsCancel gGuiHandler, % "&Cancel"
GuiAttach(3),SetSciMargin(sci[3],0,0)
WinGet, cList3, ControlList
WinGet, hList3, ControlListHWND
Gui, 03: show, w420 h530 Hide, % "Add Hotstring"
return
}
ImportGui(){
global
Gui, 04: +LastFound +Resize +MinSize +Owner1
$hwnd4 := WinExist()
Gui, 04: add, GroupBox, w500 h100, % "Import from"
Gui, 04: add, Radio, xp+10 yp+20 Checked gGuiHandler vimType , % "Folder"
Gui, 04: add, Radio,x+10 gGuiHandler, % "File"
Gui, 04: add, CheckBox, xp-58 y+10 HWND$imIncFolders Checked vimRecurse, % "Include subfolders"
Gui, 04: add, CheckBox,x+10 Checked vimHK, % "Import Hotkeys"
Gui, 04: add, CheckBox,x+10 Checked vimHS, % "Import Hotstrings"
Gui, 04: add, Edit, x20 yp+20 w315 vimPath, % a_mydocuments
Gui, 04: add, Button, x+10 w75 gGuiHandler, % "&Browse..."
Gui, 04: add, Button, x+10 wp gGuiHandler, % "&Import"
Gui, 04: add, ListView, x10 y+30 w500 r10 HWND$imList Sort Grid AltSubmit gListHandler vimList
, % "Type|Acelerator|Command|Path"
Gui, 04: add, Text, x0 y+10 w540 0x10 HWND$imDelim
Gui, 04: add, Button, xp+274 yp+10 w75 HWND$imAccept Default gGuiHandler, % "&Accept"
Gui, 04: add, Button, x+1 yp w75 HWND$imClear gGuiHandler, % "C&lear"
Gui, 04: add, Button, x+10 yp w75 HWND$imCancel gGuiHandler, % "&Cancel"
GuiAttach(4)
Gui, 04: show, w520 h340 Hide , % "Import"
return
}
ExportGui(){
global
Gui, 05: +LastFound +Owner1
$hwnd5 := WinExist()
Gui, 05: add, GroupBox, w480 h80, % "Export to"
Gui, 05: add, CheckBox,xp+10 yp+20 Checked vexHK, % "Export Hotkeys"
Gui, 05: add, CheckBox,x+10 Checked vexHS, % "Export Hotstrings"
Gui, 05: add, Edit, x20 yp+20 w375 vexPath, % a_mydocuments "\export_" subStr(a_now,1,8) ".ahk"
Gui, 05: add, Button, x+10 w75 gGuiHandler, % "&Browse..."
Gui, 05: add, Text, x0 y+30 w520 0x10
Gui, 05: add, Button, xp+330 yp+10 w75 gGuiHandler, % "&Export"
Gui, 05: add, Button, x+10 wp gGuiHandler, % "&Cancel"
GuiAttach(5)
Gui, 05: show, w500 h140 Hide, % "Export"
return
}
PreferencesGui(){
global
Gui, 06: -MinimizeBox -MaximizeBox +LastFound +Owner1
Gui, 06: Default
$hwnd6 := WinExist()
Gui, 06: add, TreeView, y30 w150 h260 AltSubmit -0x4 0x200 -Buttons -HScroll gListHandler vPrefList
;{ TreeView Item List
$P1 := TV_Add("General Preferences", 0, "Expand")
$P1C1 := TV_Add("Code Detection", $P1, "Expand")
$C1C1 := TV_Add("Keywords", $P1C1, "Expand")
$C1C2 := TV_Add("Pastebin Options", $P1C1, "Expand")
$P1C2 := TV_Add("Command Helper", $P1, "Expand")
$C2C1 := TV_Add("Options", $P1C2, "Expand")
$P1C3 := TV_Add("Live Code", $P1, "Expand")
$C3C1 := TV_Add("Run Code With", $P1C3, "Expand")
$C3C2 := TV_Add("Keywords", $P1C3, "Expand")
$C3C3 := TV_Add("Syntax Styles", $P1C3, "Expand")
$P1C4 := TV_Add("Screen Tools", $P1, "Expand")
; $P1C4 := TV_Add("Script Manager", $P1, "Expand")
;}
Gui, 06: font, s16
Gui, 06: add, Text, x+5 y0 HWND$Title vTitle, % "General Preferences"
Gui, 06: font
Gui, 06: add, Text, x165 y+5 w370 0x10
Gui, 06: add, Picture, x165 y36 vAHKTK_UC Hidden, % "res\img\AHK-TK_UnderConstruction.png"
;{ General Preferences GUI
Gui, 98: -Caption +LastFound +Owner6 -0x80000000 +0x40000000 +DelimiterSpace ; +Border -WS_POPUP +WS_CHILD
$hwnd98 := WinExist()
vars := "ssi|smm|sww|cfu"
Loop, Parse, vars, |
_%a_loopfield% := options.selectSingleNode("//@" a_loopfield).text
Gui, 98: add, GroupBox, x3 y0 w345 h70, % "Startup"
Gui, 98: add, CheckBox, xp+25 yp+20 Checked%_ssi% v_ssi gGuiHandler, % "Show splash image"
Gui, 98: add, CheckBox, x+70 Checked%_sww% v_sww gGuiHandler, % "Start with Windows"
Gui, 98: add, CheckBox, x28 y+10 Checked%_smm% v_smm gGuiHandler, % "Start minimized"
Gui, 98: add, CheckBox, x+91 Checked%_cfu% v_cfu gGuiHandler, % "Check for updates"
_mhk := options.selectSingleNode("MainKey").text
vars := "ctrl|alt|shift|win"
Loop, Parse, vars, |
_%a_loopfield% := options.selectSingleNode("MainKey/@" a_loopfield).text
_mods:=(_ctrl ? "^" : null)(_alt ? "!" : null)(_shift ? "+" : null)(_win ? "#" : null)
Gui, 98: add, GroupBox, x3 y+20 w345 h55, % "Main GUI Hotkey"
Gui, 98: add, CheckBox, xp+10 yp+23 Checked%_ctrl% HWND$_ctrl v_ctrl gGuiHandler, % "Ctrl"
Gui, 98: add, CheckBox, x+10 Checked%_alt% HWND$_alt v_alt gGuiHandler, % "Alt"
Gui, 98: add, CheckBox, x+10 Checked%_shift% HWND$_shift v_shift gGuiHandler, % "Shift"
Gui, 98: add, CheckBox, x+10 Checked%_win% HWND$_win v_win gGuiHandler, % "Win"
Gui, 98: add, DropDownList, x+10 yp-3 w140 HWND$GP_DDL v_hkddl gGuiHandler
, % lst := "Default " klist("all^", "mods msb")
Control,ChooseString,%_mhk%,, ahk_id %$GP_DDL%
; SetHotkeys(lst,$GP_DDL, "Preferences")
Gui, 98: add, GroupBox, x3 y+26 w345 h100 Disabled, % "Suspend hotkeys on these windows"
Gui, 98: add, Edit, xp+10 yp+20 w325 h70 HWND$GP_E1 v_swl gGuiHandler Disabled
, % options.selectSingleNode("SuspWndList").text
Hotkey, % _mods _mhk, GuiClose
Gui, 98: show, x165 y36 w350 h245 NoActivate
;}
;{ Code Detection Preferences
Gui, 97: -Caption +LastFound +Owner6 -0x80000000 +0x40000000 +DelimiterSpace ; +Border -WS_POPUP +WS_CHILD
$hwnd97 := WinExist()
Gui, 97: add, GroupBox, x3 y0 w345 h145, % "Info"
Gui, 97: add, Text, xp+10 yp+20 w330
, % "CODET attempts to detect AutoHotkey code copied to the clipboard.`n`n"
. "Then it allows you to upload the code to a pastebin service like the ones offered by "
. "www.autohotkey.net or www.pastebin.com.`n`n"
. "You can select the minimum amount of keywords to match "
. "and you can also edit the keyword list to add or delete words as you want to fine tune "
. "CODET to match your needs and avoid false detections.`n"
Gui, 97: add, Text, x0 y+20 w360 0x10
Gui, 97: add, GroupBox, x3 yp+10 w345 h70, % "General Preferences"
codStat := options.selectSingleNode("//Codet/@status").text
codMode := options.selectSingleNode("//Codet/@mode").text
Gui, 97: add, CheckBox, xp+7 yp+20 HWND$codStat Checked%codStat% gGuiHandler vcodStat
, % "Enable Command Detection"
Gui, 97: add, Radio, xp y+10 HWND$codMode1 gGuiHandler vcodMode, % "Show Popup"
Gui, 97: add, Radio, x+10 HWND$codMode2 gGuiHandler, % "Automatic Upload"
selRadio := codMode = 1 ? ("Show Popup", options.selectSingleNode("//Codet/@mode").text := 1)
: ("Automatic Upload", options.selectSingleNode("//Codet/@mode").text := 2)
GuiControl, 97: , %selRadio%, 1
Gui, 97: show, x165 y36 w350 h245 NoActivate
;}
;{ Code Detection > Keywords Preferences
Gui, 96: -Caption +LastFound +Owner6 -0x80000000 +0x40000000 +DelimiterSpace ; +Border -WS_POPUP +WS_CHILD
$hwnd96 := WinExist()
Gui, 96: add, GroupBox, x3 y0 w345 h110, % "Info"
Gui, 96: add, Text, xp+10 yp+20 w330
, % "There can be false detections because some AHK keywords can be found "
. "in normal text or other programming languages.`n`n"
. "Here you can select the minimum amount of keywords to match "
. "(the more the more accurate) and you can also add or delete words "
. "from the list of keywords to fine tune CODET to your liking."
Gui, 96: add, Text, x0 y+20 w360 0x10
Gui, 96: add, Edit, x3 yp+9 w345 h90 HWND$codKwords 0x100 gGuiHandler vcodKwords
, % options.selectSingleNode("//Codet/Keywords").text
Gui, 96: add, Text, x3 y+8, % "Min. keyword match:"
Gui, 96: add, Edit, x+10 yp-3 w25 Center gGuiHandler vcodMin
, % options.selectSingleNode("//Codet/Keywords/@min").text
Gui, 96: font, s8 cGray italic, Verdana
Gui, 96: add, Edit, x+11 w201 HWND$QScod Center gGuiHandler vQScod, % "Quick Search"
Gui, 96: font
Gui, 96: show, x165 y36 w350 h245 NoActivate
;}
;{ Code Detection > Pastebin Preferences
Gui, 95: -Caption +LastFound +Owner6 -0x80000000 +0x40000000 ; +Border ; -WS_POPUP +WS_CHILD
$hwnd95 := WinExist()
curr:=options.selectSingleNode("//Codet/Pastebin/@current").text
ahknet := curr = "Autohotkey.net" ? 1 : 0
Gui, 95: add, GroupBox, x3 y0 w345 h110, % "Info"
Gui, 95: add, Text, xp+10 yp+20 w330
, % "If AutoUpload is enabled you wont be prompted to select a Pastebin,`n"
. "instead the info will be retrieved from here.`n`n"
. "You can change the default options for the AutoUpload function here.`n`n"
. "For Pastebin.com click on the 'Get Key' button to get a user key."
Gui, 95: add, Text, x0 y+20 w360 0x10
Gui, 95: add, Text, x3 yp+10, % "Current Bin"
Gui, 95: add, DropDownList, HWND$CP_DDL x3 y+10 w140 gGuiHandler vpbp_ddl
, % "AutoHotkey.net||Pastebin.com" ; |Gist.com"
Gui, 95: add, Button, HWND$pbpButton1 x+10 yp w75 gGuiHandler Disabled, % "Get User Key"
Gui, 95: add, Text, HWND$pbpText1 x3 y+15 w100, % ahknet ? "Nick" : "User Key"
Gui, 95: add, Text, xp+150, % "Privacy"
Gui, 95: add, Text, HWND$pbpText2 xp+80 Disabled, % "Expiration"
Gui, 95: add, Edit, HWND$pbpText3 w140 x3 y+10 gGuiHandler vpbp_user
, % ahknet ? options.selectSingleNode("//Codet/Pastebin/AutoHotkey/@nick").text
: options.selectSingleNode("//Codet/Pastebin/PasteBin/@key").text
Gui, 95: add, DropDownList, HWND$CP_DDL2 w70 x+10 gGuiHandler vpbp_exposure, % "Public||Private"
Control,ChooseString
,% ahknet ? options.selectSingleNode("//Codet/Pastebin/AutoHotkey/@private").text = 1 ? "Private" : "Public"
: options.selectSingleNode("//Codet/Pastebin/PasteBin/@private").text = 1 ? "Private" : "Public"
,, ahk_id %$CP_DDL2%
Gui, 95: add, DropDownList, HWND$CP_DDL3 w115 x+10 gGuiHandler vpbp_expiration Disabled
, % "Never|10 Minutes||1 Hour|1 Day|1 Month"
Control,ChooseString
,% options.selectSingleNode("//Codet/Pastebin/PasteBin/@expiration").text
,, ahk_id %$CP_DDL3%
Control,ChooseString,%curr%,, ahk_id %$CP_DDL%
Gui, 95: show, x165 y36 w350 h245 NoActivate
;}
;{ Command Helper
Gui, 93: -Caption +LastFound +Owner6 -0x80000000 +0x40000000 +DelimiterSpace ; +Border ; -WS_POPUP +WS_CHILD
$hwnd93 := WinExist()
Gui, 93: add, GroupBox, x3 y0 w345 h150, % "Info"
Gui, 93: add, Text, xp+10 yp+25 w330
, % "CMDHelper looks up the current selected word on the AHK help file.`n"
. "Optionally you can set it to use the online help in case you dont have ahk installed or "
. "if you are planning on sharing the link instead.`n`n"
. "If you have the Forums Tags options enable you can use the Tags hotkey "
. "to link the word under the cursor to the online documentation, providing an easy way "
. "to help users to inform themselves about the command you just mentioned in your reply.`n"
Gui, 93: add, Text, x0 y+20 w360 0x10
Gui, 93: add, GroupBox, x3 yp+10 w345 h70, % "Features"
Gui, 93: add, CheckBox, xp+25 yp+20 HWND$cmdStat Checked%cmdStat% gGuiHandler vcmdStat, % "Enable CMDHelper"
Gui, 93: add, CheckBox, xp+180 HWND$_uoh Checked%_uoh% gGuiHandler v_uoh, % "Use Online Help"
Gui, 93: add, CheckBox, x28 y+10 HWND$_eie Checked%_eie% Disabled gGuiHandler v_eie
, % "Enable in Internal Editors"
Gui, 93: add, CheckBox, xp+180 HWND$_eft Checked%_eft% gGuiHandler v_eft, % "AHK Forum Tags"
Gui, 93: show, x165 y36 w350 h245 NoActivate
;}