forked from Pulover/PuloversMacroCreator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MacroCreator.ahk
16238 lines (15562 loc) · 462 KB
/
MacroCreator.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
; *****************************
; :: PULOVER'S MACRO CREATOR ::
; *****************************
; "The Complete Automation Tool"
; Author: Pulover [Rodolfo U. Batista]
; Home: http://www.macrocreator.com
; Forum: http://autohotkey.com/boards/viewtopic.php?f=6&t=143
; Version: 5.0.5
; Release Date: August, 2016
; AutoHotkey Version: 1.1.24.01
; Copyright © 2012-2017 Rodolfo U. Batista
; I specifically grant Michael Wong (user guest3456 on AHK forums) use of this code
; under the terms of the UNLICENSE here: <http://unlicense.org/UNLICENSE>
; For everyone else, the GPL below applies.
; GNU General Public License 3.0 or higher
; <http://www.gnu.org/licenses/gpl-3.0.txt>
/*
Thanks to:
tic (Tariq Porter) for his GDI+ Library.
http://autohotkey.com/boards/viewtopic.php?t=6517
tkoi & majkinetor for the Graphic Buttons function.
http://www.autohotkey.com/board/topic/37147-ilbutton-image-buttons
just me for LV_Colors Class, LV_EX/IL_EX libraries and for updating ILButton to 64bit.
http://autohotkey.com/boards/viewtopic.php?f=6&t=1081
http://autohotkey.com/boards/viewtopic.php?t=1256
http://autohotkey.com/boards/viewtopic.php?f=6&t=1273
Micahs for the base code of the Drag-Rows function.
http://www.autohotkey.com/board/topic/30486-listview-tooltip-on-mouse-hover/?p=280843
jaco0646 for the function to make hotkey controls detect other keys.
http://www.autohotkey.com/board/topic/47439-user-defined-dynamic-hotkeys
Uberi for the ExprEval function to solve expressions.
http://autohotkey.com/board/topic/64167-expreval-evaluate-expressions
Jethrow for the IEGet & WBGet Functions.
http://www.autohotkey.com/board/topic/47052-basic-webpage-controls
RaptorX for the Scintilla Wrapper for AHK
http://www.autohotkey.com/board/topic/85928-wrapper-scintilla-wrapper
majkinetor for the Dlg_Color function.
http://www.autohotkey.com/board/topic/49214-ahk-ahk-l-forms-framework-08/
rbrtryn for the ChooseColor function.
http://www.autohotkey.com/board/topic/91229-windows-color-picker-plus/
PhiLho and skwire for the function to Get/Set the order of columns.
http://www.autohotkey.com/board/topic/11926-can-you-move-a-listview-column-programmatically/#entry237340
fincs for GenDocs and SciLexer.dll custom builds.
http://www.autohotkey.com/board/topic/71751-gendocs-v30-alpha002
http://www.autohotkey.com/board/topic/54431-scite4autohotkey-v3004-updated-aug-14-2013/page-58#entry566139
tmplinshi for the CreateFormData function.
http://autohotkey.com/boards/viewtopic.php?f=6&t=7647
Thiago Talma for some improvements to the code, debugging and many suggestions.
Translation revisions:
http://www.macrocreator.com/project/
*/
; Compiler Settings
;@Ahk2Exe-SetName Pulover's Macro Creator
;@Ahk2Exe-SetDescription Pulover's Macro Creator
;@Ahk2Exe-SetVersion 5.0.5
;@Ahk2Exe-SetCopyright Copyright © 2012-2016 Rodolfo U. Batista
;@Ahk2Exe-SetOrigFilename MacroCreator.exe
#NoEnv
ListLines Off
#InstallKeybdHook
#MaxThreadsBuffer On
#MaxHotkeysPerInterval 999999999
#HotkeyInterval 9999999999
SetWorkingDir %A_ScriptDir%
SendMode, Input
#WinActivateForce
SetTitleMatchMode, 2
SetControlDelay, 1
SetWinDelay, 0
SetKeyDelay, -1
SetMouseDelay, -1
SetBatchLines, -1
FileEncoding, UTF-8
Process, Priority,, High
#NoTrayIcon
CoordMode, Menu, Window
CoordMode, Tooltip, Window
Menu, Tray, Tip, Pulovers's Macro Creator
DefaultIcon := (A_IsCompiled) ? A_ScriptFullPath
: (FileExist(A_ScriptDir "\Resources\PMC4_Mult.ico") ? A_ScriptDir "\Resources\PMC4_Mult.ico" : A_AhkPath)
Menu, Tray, Icon, %DefaultIcon%, 1, 1
SciDllPath := (A_IsCompiled) ? (A_ScriptDir "\SciLexer.dll")
: (A_ScriptDir ((A_PtrSize = 8) ? "\SciLexer-x64.dll" : "\SciLexer-x86.dll"))
DllCall("LoadLibrary", "Str", SciDllPath)
IfNotExist, %SciDllPath%
{
MsgBox, 16, Error, A required DLL is missing. Please reinstall the application.
ExitApp
}
ResDllPath := A_ScriptDir "\Resources.dll", hIL_Icons := IL_Create(10, 10)
, hIL_IconsHi := IL_Create(10, 10), IL_EX_SetSize(hIL_IconsHi, 24, 24)
IfNotExist, %ResDllPath%
{
MsgBox, 16, Error, A required DLL is missing. Please reinstall the application.
ExitApp
}
Loop
{
If (!IL_Add(hIL_Icons, ResDllPath, A_Index) && (A_Index > 1))
break
}
Loop
{
If (!IL_Add(hIL_IconsHi, ResDllPath, A_Index) && (A_Index > 1))
break
}
CurrentVersion := "5.0.5", ReleaseDate := "August, 2016"
;##### Ini File Read #####
If (!FileExist(A_ScriptDir "\MacroCreator.ini") && !InStr(FileExist(A_AppData "\MacroCreator"), "D"))
FileCreateDir, %A_AppData%\MacroCreator
SettingsFolder := FileExist(A_ScriptDir "\MacroCreator.ini") ? A_ScriptDir : A_AppData "\MacroCreator"
, IniFilePath := SettingsFolder "\MacroCreator.ini", UserVarsPath := SettingsFolder "\UserGlobalVars.ini"
, UserAccountsPath := SettingsFolder "\UserEmailAccounts.ini"
IniRead, Version, %IniFilePath%, Application, Version
IniRead, Lang, %IniFilePath%, Language, Lang
IniRead, LangVersion, %IniFilePath%, Language, LangVersion, 2
IniRead, LangLastCheck, %IniFilePath%, Language, LangLastCheck, 2
IniRead, AutoKey, %IniFilePath%, HotKeys, AutoKey, F3|F4|F5|F6|F7
IniRead, ManKey, %IniFilePath%, HotKeys, ManKey, |
IniRead, AbortKey, %IniFilePath%, HotKeys, AbortKey, F8
IniRead, PauseKey, %IniFilePath%, HotKeys, PauseKey, F12
IniRead, RecKey, %IniFilePath%, HotKeys, RecKey, F9
IniRead, RecNewKey, %IniFilePath%, HotKeys, RecNewKey, F10
IniRead, RelKey, %IniFilePath%, HotKeys, RelKey, CapsLock
IniRead, FastKey, %IniFilePath%, HotKeys, FastKey, Insert
IniRead, SlowKey, %IniFilePath%, HotKeys, SlowKey, Pause
IniRead, ClearNewList, %IniFilePath%, Options, ClearNewList, 0
IniRead, DelayG, %IniFilePath%, Options, DelayG, 0
IniRead, OnScCtrl, %IniFilePath%, Options, OnScCtrl, 1
IniRead, ShowStep, %IniFilePath%, Options, ShowStep, 1
IniRead, HideMainWin, %IniFilePath%, Options, HideMainWin, 1
IniRead, DontShowPb, %IniFilePath%, Options, DontShowPb, 0
IniRead, DontShowRec, %IniFilePath%, Options, DontShowRec, 0
IniRead, DontShowEdt, %IniFilePath%, Options, DontShowEdt, 0
IniRead, ConfirmDelete, %IniFilePath%, Options, ConfirmDelete, 1
IniRead, ShowTips, %IniFilePath%, Options, ShowTips, 1
IniRead, NextTip, %IniFilePath%, Options, NextTip, 1
IniRead, IfDirectContext, %IniFilePath%, Options, IfDirectContext, None
IniRead, IfDirectWindow, %IniFilePath%, Options, IfDirectWindow, %A_Space%
IniRead, KeepHkOn, %IniFilePath%, Options, KeepHkOn, 0
IniRead, Mouse, %IniFilePath%, Options, Mouse, 1
IniRead, Moves, %IniFilePath%, Options, Moves, 1
IniRead, TimedI, %IniFilePath%, Options, TimedI, 1
IniRead, Strokes, %IniFilePath%, Options, Strokes, 1
IniRead, CaptKDn, %IniFilePath%, Options, CaptKDn, 0
IniRead, MScroll, %IniFilePath%, Options, MScroll, 1
IniRead, WClass, %IniFilePath%, Options, WClass, 1
IniRead, WTitle, %IniFilePath%, Options, WTitle, 1
IniRead, MDelay, %IniFilePath%, Options, MDelay, 0
IniRead, DelayM, %IniFilePath%, Options, DelayM, 10
IniRead, DelayW, %IniFilePath%, Options, DelayW, 333
IniRead, MaxHistory, %IniFilePath%, Options, MaxHistory, 100
IniRead, TDelay, %IniFilePath%, Options, TDelay, 10
IniRead, ToggleC, %IniFilePath%, Options, ToggleC, 0
IniRead, RecKeybdCtrl, %IniFilePath%, Options, RecKeybdCtrl, 0
IniRead, RecMouseCtrl, %IniFilePath%, Options, RecMouseCtrl, 0
IniRead, CoordMouse, %IniFilePath%, Options, CoordMouse, Window
IniRead, TitleMatch, %IniFilePath%, Options, TitleMatch, 2
IniRead, TitleSpeed, %IniFilePath%, Options, TitleSpeed, Fast
IniRead, KeyMode, %IniFilePath%, Options, KeyMode, Input
IniRead, KeyDelay, %IniFilePath%, Options, KeyDelay, -1
IniRead, MouseDelay, %IniFilePath%, Options, MouseDelay, -1
IniRead, ControlDelay, %IniFilePath%, Options, ControlDelay, 1
IniRead, HiddenWin, %IniFilePath%, Options, HiddenWin, 0
IniRead, HiddenText, %IniFilePath%, Options, HiddenText, 1
IniRead, SpeedUp, %IniFilePath%, Options, SpeedUp, 2
IniRead, SpeedDn, %IniFilePath%, Options, SpeedDn, 2
IniRead, HideErrors, %IniFilePath%, Options, HideErrors, 0
IniRead, MouseReturn, %IniFilePath%, Options, MouseReturn, 0
IniRead, ShowProgBar, %IniFilePath%, Options, ShowProgBar, 1
IniRead, ShowBarOnStart, %IniFilePath%, Options, ShowBarOnStart, 0
IniRead, AutoHideBar, %IniFilePath%, Options, AutoHideBar, 0
IniRead, RandomSleeps, %IniFilePath%, Options, RandomSleeps, 0
IniRead, RandPercent, %IniFilePath%, Options, RandPercent, 50
IniRead, DrawButton, %IniFilePath%, Options, DrawButton, RButton
IniRead, OnRelease, %IniFilePath%, Options, OnRelease, 1
IniRead, OnEnter, %IniFilePath%, Options, OnEnter, 0
IniRead, LineW, %IniFilePath%, Options, LineW, 2
IniRead, ScreenDir, %IniFilePath%, Options, ScreenDir, %SettingsFolder%\Screenshots
IniRead, GetWinTitle, %IniFilePath%, Options, GetWinTitle, 1,0,0,0,0
IniRead, DefaultEditor, %IniFilePath%, Options, DefaultEditor
IniRead, DefaultMacro, %IniFilePath%, Options, DefaultMacro, %A_Space%
IniRead, StdLibFile, %IniFilePath%, Options, StdLibFile, %A_Space%
IniRead, KeepDefKeys, %IniFilePath%, Options, KeepDefKeys, 0
IniRead, TbNoTheme, %IniFilePath%, Options, TbNoTheme, 0
IniRead, AutoBackup, %IniFilePath%, Options, AutoBackup, 1
IniRead, MultInst, %IniFilePath%, Options, MultInst, 0
IniRead, EvalDefault, %IniFilePath%, Options, EvalDefault, 0
IniRead, CloseAction, %IniFilePath%, Options, CloseAction, %A_Space%
IniRead, ShowLoopIfMark, %IniFilePath%, Options, ShowLoopIfMark, 1
IniRead, ShowActIdent, %IniFilePath%, Options, ShowActIdent, 1
IniRead, SearchAreaColor, %IniFilePath%, Options, SearchAreaColor, 0xFF0000
IniRead, LoopLVColor, %IniFilePath%, Options, LoopLVColor, 0xFFFF80
IniRead, IfLVColor, %IniFilePath%, Options, IfLVColor, 0x0080FF
IniRead, VirtualKeys, %IniFilePath%, Options, VirtualKeys, % "
(Join
{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}
{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{1}{2}{3}{4}{5}{6}{7}{8}{9}{0}
{'}{-}{=}{[}{]}{;}{/}{,}{.}{\}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}
{Del}{Ins}{BS}{Esc}{PrintScreen}{Pause}{Enter}{Tab}{Space}
{Numpad0}{Numpad1}{Numpad2}{Numpad3}{Numpad4}{Numpad5}{Numpad6}{Numpad7}{Numpad8}{Numpad9}
{NumpadDot}{NumpadDiv}{NumpadMult}{NumpadAdd}{NumpadSub}{NumpadIns}{NumpadEnd}{NumpadDown}
{NumpadPgDn}{NumpadLeft}{NumpadClear}{NumpadRight}{NumpadHome}{NumpadUp}{NumpadPgUp}{NumpadDel}
{NumpadEnter}{Browser_Back}{Browser_Forward}{Browser_Refresh}{Browser_Stop}{Browser_Search}
{Browser_Favorites}{Browser_Home}{Volume_Mute}{Volume_Down}{Volume_Up}{Media_Next}{Media_Prev}
{Media_Stop}{Media_Play_Pause}{Launch_Mail}{Launch_Media}{Launch_App1}{Launch_App2}
)"
IniRead, AutoUpdate, %IniFilePath%, Options, AutoUpdate, 1
IniRead, Ex_AbortKey, %IniFilePath%, ExportOptions, Ex_AbortKey, 0
IniRead, Ex_PauseKey, %IniFilePath%, ExportOptions, Ex_PauseKey, 0
IniRead, Ex_SM, %IniFilePath%, ExportOptions, Ex_SM, 1
IniRead, SM, %IniFilePath%, ExportOptions, SM, Input
IniRead, Ex_SI, %IniFilePath%, ExportOptions, Ex_SI, 1
IniRead, SI, %IniFilePath%, ExportOptions, SI, Force
IniRead, Ex_ST, %IniFilePath%, ExportOptions, Ex_ST, 1
IniRead, Ex_SP, %IniFilePath%, ExportOptions, Ex_SP, 0
IniRead, Ex_CM, %IniFilePath%, ExportOptions, Ex_CM, 1
IniRead, Ex_DH, %IniFilePath%, ExportOptions, Ex_DH, 0
IniRead, Ex_DT, %IniFilePath%, ExportOptions, Ex_DT, 0
IniRead, Ex_AF, %IniFilePath%, ExportOptions, Ex_AF, 1
IniRead, Ex_HK, %IniFilePath%, ExportOptions, Ex_HK, 0
IniRead, Ex_PT, %IniFilePath%, ExportOptions, Ex_PT, 0
IniRead, Ex_NT, %IniFilePath%, ExportOptions, Ex_NT, 0
IniRead, Ex_WN, %IniFilePath%, ExportOptions, Ex_WN, 0
IniRead, Ex_SC, %IniFilePath%, ExportOptions, Ex_SC, 1
IniRead, Ex_SW, %IniFilePath%, ExportOptions, Ex_SW, 1
IniRead, SW, %IniFilePath%, ExportOptions, SW, 0
IniRead, Ex_SK, %IniFilePath%, ExportOptions, Ex_SK, 1
IniRead, Ex_MD, %IniFilePath%, ExportOptions, Ex_MD, 1
IniRead, Ex_SB, %IniFilePath%, ExportOptions, Ex_SB, 1
IniRead, SB, %IniFilePath%, ExportOptions, SB, -1
IniRead, Ex_MT, %IniFilePath%, ExportOptions, Ex_MT, 0
IniRead, MT, %IniFilePath%, ExportOptions, MT, 2
IniRead, Ex_IN, %IniFilePath%, ExportOptions, Ex_IN, 1
IniRead, Ex_UV, %IniFilePath%, ExportOptions, Ex_UV, 1
IniRead, Ex_Speed, %IniFilePath%, ExportOptions, Ex_Speed, 0
IniRead, ComCr, %IniFilePath%, ExportOptions, ComCr, 1
IniRead, ComAc, %IniFilePath%, ExportOptions, ComAc, 0
IniRead, Send_Loop, %IniFilePath%, ExportOptions, Send_Loop, 0
IniRead, TabIndent, %IniFilePath%, ExportOptions, TabIndent, 1
IniRead, IndentWith, %IniFilePath%, ExportOptions, IndentWith, Space
IniRead, ConvertBreaks, %IniFilePath%, ExportOptions, ConvertBreaks, 1
IniRead, IncPmc, %IniFilePath%, ExportOptions, IncPmc, 0
IniRead, Exe_Exp, %IniFilePath%, ExportOptions, Exe_Exp, 0
IniRead, MainWinSize, %IniFilePath%, WindowOptions, MainWinSize, W930 H630
IniRead, MainWinPos, %IniFilePath%, WindowOptions, MainWinPos, Center
IniRead, WinState, %IniFilePath%, WindowOptions, WinState, 1
IniRead, ColSizes, %IniFilePath%, WindowOptions, ColSizes, 70,185,335,60,60,100,150,225,85,50
IniRead, ColOrder, %IniFilePath%, WindowOptions, ColOrder, 1,2,3,4,5,6,7,8,9,10
IniRead, PrevWinSize, %IniFilePath%, WindowOptions, PrevWinSize, W450 H500
IniRead, ShowPrev, %IniFilePath%, WindowOptions, ShowPrev, 1
IniRead, TextWrap, %IniFilePath%, WindowOptions, TextWrap, 0
IniRead, CommentUnchecked, %IniFilePath%, WindowOptions, CommentUnchecked, 1
IniRead, CustomColors, %IniFilePath%, WindowOptions, CustomColors, 0
IniRead, OSCPos, %IniFilePath%, WindowOptions, OSCPos, X0 Y0
IniRead, OSTrans, %IniFilePath%, WindowOptions, OSTrans, 255
IniRead, OSCaption, %IniFilePath%, WindowOptions, OSCaption, 0
IniRead, AutoRefresh, %IniFilePath%, WindowOptions, AutoRefresh, 1
IniRead, ShowGroups, %IniFilePath%, WindowOptions, ShowGroups, 0
IniRead, BarInfo, %IniFilePath%, WindowOptions, BarInfo, 1
IniRead, IconSize, %IniFilePath%, ToolbarOptions, IconSize, Large
IniRead, UserLayout, %IniFilePath%, ToolbarOptions, UserLayout
IniRead, MainLayout, %IniFilePath%, ToolbarOptions, MainLayout
IniRead, MacroLayout, %IniFilePath%, ToolbarOptions, MacroLayout
IniRead, FileLayout, %IniFilePath%, ToolbarOptions, FileLayout
IniRead, RecPlayLayout, %IniFilePath%, ToolbarOptions, RecPlayLayout
IniRead, SettingsLayout, %IniFilePath%, ToolbarOptions, SettingsLayout
IniRead, CommandLayout, %IniFilePath%, ToolbarOptions, CommandLayout
IniRead, EditLayout, %IniFilePath%, ToolbarOptions, EditLayout
IniRead, ShowBands, %IniFilePath%, ToolbarOptions, ShowBands, 1,1,1,1,1,1,1,1,1,1,1
If (Version < "5.0.0")
ShowTips := 1, NextTip := 1, MainLayout := "ERROR", UserLayout := "ERROR"
If (LangVersion < 4)
LangVersion := 4, LangLastCheck := 4
User_Vars := new ObjIni(UserVarsPath)
, User_Vars.Read()
, UserVars := User_Vars.Get(true)
For _each, _Section in UserVars
For _key, _value in _Section
Try SavedVars(_key)
UserMailAccounts := new ObjIni(UserAccountsPath)
If (DefaultEditor = "ERROR")
{
SplitPath, A_AhkPath,, AhkDir
ProgramsFolder := (A_PtrSize = 8) ? ProgramFiles " (x86)" : ProgramFiles
If (FileExist(AhkDir "\SciTE\SciTE.exe"))
DefaultEditor := AhkDir "\SciTE\SciTE.exe"
Else If (FileExist(ProgramsFolder "\Notepad++\notepad++.exe"))
DefaultEditor := ProgramsFolder "\Notepad++\notepad++.exe"
Else If (FileExist(ProgramFiles "\Sublime Text 2\sublime_text.exe"))
DefaultEditor := ProgramFiles "\Sublime Text 2\sublime_text.exe"
Else If (FileExist(ProgramsFolder "\Notepad2\Notepad2.exe"))
DefaultEditor := ProgramsFolder "\Notepad2\Notepad2.exe"
Else
DefaultEditor := "notepad.exe"
}
If (IconSize = "ERROR")
IconSize := "Large"
hIL := (IconSize = "Large") ? hIL_IconsHi : hIL_Icons
LangInfo := "
(Join`n
0036 af Afrikaans Afrikaans Afrikaans
0436 af_ZA Afrikaans (South Africa) Afrikaans Afrikaans (Suid Afrika)
001C sq Albanian Albanian Shqipe
041C sq_AL Albanian (Albania) Albanian Shqipe (Shqipëria)
0484 gsw_FR Alsatian (France) Alsatian Elsässisch (Frànkrisch)
045E am_ET Amharic (Ethiopia) Amharic አማርኛ (ኢትዮጵያ)
0001 ar Arabic Arabic العربية
1401 ar_DZ Arabic (Algeria) Arabic العربية (الجزائر)
3C01 ar_BH Arabic (Bahrain) Arabic العربية (البحرين)
0C01 ar_EG Arabic (Egypt) Arabic العربية (مصر)
0801 ar_IQ Arabic (Iraq) Arabic العربية (العراق)
2C01 ar_JO Arabic (Jordan) Arabic العربية (الأردن)
3401 ar_KW Arabic (Kuwait) Arabic العربية (الكويت)
3001 ar_LB Arabic (Lebanon) Arabic العربية (لبنان)
1001 ar_LY Arabic (Libya) Arabic العربية (ليبيا)
1801 ar_MA Arabic (Morocco) Arabic العربية (المملكة المغربية)
2001 ar_OM Arabic (Oman) Arabic العربية (عمان)
4001 ar_QA Arabic (Qatar) Arabic العربية (قطر)
0401 ar_SA Arabic (Saudi Arabia) Arabic العربية (المملكة العربية السعودية)
2801 ar_SY Arabic (Syria) Arabic العربية (سوريا)
1C01 ar_TN Arabic (Tunisia) Arabic العربية (تونس)
3801 ar_AE Arabic (U.A.E.) Arabic العربية (الإمارات العربية المتحدة)
2401 ar_YE Arabic (Yemen) Arabic العربية (اليمن)
002B hy Armenian Armenian Հայերեն
042B hy_AM Armenian (Armenia) Armenian Հայերեն (Հայաստան)
044D as_IN Assamese (India) Assamese অসমীয়া (ভাৰত)
002C az Azeri Azeri (Latin) Azərbaycanılı
082C az_Cyrl_AZ Azeri (Cyrillic, Azerbaijan) Azeri (Cyrillic) Азәрбајҹан (Азәрбајҹан)
042C az_Latn_AZ Azeri (Latin, Azerbaijan) Azeri (Latin) Azərbaycanılı (Azərbaycanca)
046D ba_RU Bashkir (Russia) Bashkir Башҡорт (Россия)
002D eu Basque Basque Euskara
042D eu_ES Basque (Basque) Basque Euskara (euskara)
0023 be Belarusian Belarusian Беларускі
0423 be_BY Belarusian (Belarus) Belarusian Беларускі (Беларусь)
0845 bn_BD Bengali (Bangladesh) Bengali বাংলা (বাংলা)
0445 bn_IN Bengali (India) Bengali বাংলা (ভারত)
201A bs_Cyrl_BA Bosnian (Cyrillic, Bosnia and Herzegovina) Bosnian (Cyrillic) Босански (Босна и Херцеговина)
141A bs_Latn_BA Bosnian (Latin, Bosnia and Herzegovina) Bosnian (Latin) Bosanski (Bosna i Hercegovina)
047E br_FR Breton (France) Breton Brezhoneg (Frañs)
0002 bg Bulgarian Bulgarian Български
0402 bg_BG Bulgarian (Bulgaria) Bulgarian Български (България)
0003 ca Catalan Catalan Català
0403 ca_ES Catalan (Catalan) Catalan Català (català)
0C04 zh_HK Chinese (Hong Kong S.A.R.) Chinese 中文(香港特别行政區)
1404 zh_MO Chinese (Macao S.A.R.) Chinese 中文(澳門特别行政區)
0804 zh_CN Chinese (Simplified) Chinese 中文(简体)
0004 zh_Hans Chinese (Simplified) Chinese 中文(简体)
1004 zh_SG Chinese (Singapore) Chinese 中文(新加坡)
0404 zh_TW Chinese (Traditional) Chinese 中文(繁體)
7C04 zh_Hant Chinese (Traditional) Chinese 中文(繁體)
0483 co_FR Corsican (France) Corsican Corsu (France)
001A hr Croatian Croatian Hrvatski
041A hr_HR Croatian (Croatia) Croatian Hrvatski (Hrvatska)
101A hr_BA Croatian (Latin, Bosnia and Herzegovina) Croatian (Latin) Hrvatski (Bosna i Hercegovina)
0005 cs Czech Czech Čeština
0405 cs_CZ Czech (Czech Republic) Czech Čeština (Česká republika)
0006 da Danish Danish Dansk
0406 da_DK Danish (Denmark) Danish Dansk (Danmark)
048C prs_AF Dari (Afghanistan) Dari درى (افغانستان)
0065 div Divehi Divehi ދިވެހިބަސް
0465 div_MV Divehi (Maldives) Divehi ދިވެހިބަސް (ދިވެހި ރާއްޖެ)
0013 nl Dutch Dutch Nederlands
0813 nl_BE Dutch (Belgium) Dutch Nederlands (België)
0413 nl_NL Dutch (Netherlands) Dutch Nederlands (Nederland)
0009 en English English English
0C09 en_AU English (Australia) English English (Australia)
2809 en_BZ English (Belize) English English (Belize)
1009 en_CA English (Canada) English English (Canada)
2409 en_029 English (Caribbean) English English (Caribbean)
4009 en_IN English (India) English English (India)
1809 en_IE English (Ireland) English English (Eire)
2009 en_JM English (Jamaica) English English (Jamaica)
4409 en_MY English (Malaysia) English English (Malaysia)
1409 en_NZ English (New Zealand) English English (New Zealand)
3409 en_PH English (Republic of the Philippines) English English (Philippines)
4809 en_SG English (Singapore) English English (Singapore)
1C09 en_ZA English (South Africa) English English (South Africa)
2C09 en_TT English (Trinidad and Tobago) English English (Trinidad y Tobago)
0809 en_GB English (United Kingdom) English English (United Kingdom)
0409 en_US English (United States) English English (United States)
3009 en_ZW English (Zimbabwe) English English (Zimbabwe)
0025 et Estonian Estonian Eesti
0425 et_EE Estonian (Estonia) Estonian Eesti (Eesti)
0038 fo Faroese Faroese Føroyskt
0438 fo_FO Faroese (Faroe Islands) Faroese Føroyskt (Føroyar)
0464 fil_PH Filipino (Philippines) Filipino Filipino (Pilipinas)
000B fi Finnish Finnish Suomi
040B fi_FI Finnish (Finland) Finnish Suomi (Suomi)
000C fr French French Français
080C fr_BE French (Belgium) French Français (Belgique)
0C0C fr_CA French (Canada) French Français (Canada)
040C fr_FR French (France) French Français (France)
140C fr_LU French (Luxembourg) French Français (Luxembourg)
180C fr_MC French (Principality of Monaco) French Français (Principauté de Monaco)
100C fr_CH French (Switzerland) French Français (Suisse)
0462 fy_NL Frisian (Netherlands) Frisian Frysk (Nederlân)
0056 gl Galician Galician Galego
0456 gl_ES Galician (Galician) Galician Galego (galego)
0037 ka Georgian Georgian ქართული
0437 ka_GE Georgian (Georgia) Georgian ქართული (საქართველო)
0007 de German German Deutsch
0C07 de_AT German (Austria) German Deutsch (Österreich)
0407 de_DE German (Germany) German Deutsch (Deutschland)
1407 de_LI German (Liechtenstein) German Deutsch (Liechtenstein)
1007 de_LU German (Luxembourg) German Deutsch (Luxemburg)
0807 de_CH German (Switzerland) German Deutsch (Schweiz)
0008 el Greek Greek Ελληνικά
0408 el_GR Greek (Greece) Greek Ελληνικά (Ελλάδα)
046F kl_GL Greenlandic (Greenland) Greenlandic Kalaallisut (Kalaallit Nunaat)
0047 gu Gujarati Gujarati ગુજરાતી
0447 gu_IN Gujarati (India) Gujarati ગુજરાતી (ભારત)
0468 ha_Latn_NG Hausa (Latin, Nigeria) Hausa (Latin) Hausa (Nigeria)
000D he Hebrew Hebrew עברית
040D he_IL Hebrew (Israel) Hebrew עברית (ישראל)
0039 hi Hindi Hindi हिंदी
0439 hi_IN Hindi (India) Hindi हिंदी (भारत)
000E hu Hungarian Hungarian Magyar
040E hu_HU Hungarian (Hungary) Hungarian Magyar (Magyarország)
000F is Icelandic Icelandic Íslenska
040F is_IS Icelandic (Iceland) Icelandic Íslenska (Ísland)
0470 ig_NG Igbo (Nigeria) Igbo Igbo (Nigeria)
0021 id Indonesian Indonesian Bahasa Indonesia
0421 id_ID Indonesian (Indonesia) Indonesian Bahasa Indonesia (Indonesia)
085D iu_Latn_CA Inuktitut (Latin, Canada) Inuktitut (Latin) Inuktitut (Kanatami) (kanata)
045D iu_Cans_CA Inuktitut (Syllabics, Canada) Inuktitut ᐃᓄᒃᑎᑐᑦ (ᑲᓇᑕ)
083C ga_IE Irish (Ireland) Irish Gaeilge (Éire)
0434 xh_ZA Xhosa (South Africa) Xhosa Xhosa (uMzantsi Afrika)
0435 zu_ZA Zulu (South Africa) Zulu Zulu (iNingizimu Afrika)
0010 it Italian Italian Italiano
0410 it_IT Italian (Italy) Italian Italiano (Italia)
0810 it_CH Italian (Switzerland) Italian Italiano (Svizzera)
0011 ja Japanese Japanese 日本語
0411 ja_JP Japanese (Japan) Japanese 日本語 (日本)
004B kn Kannada Kannada ಕನ್ನಡ
044B kn_IN Kannada (India) Kannada ಕನ್ನಡ (ಭಾರತ)
003F kk Kazakh Kazakh Қазащb
043F kk_KZ Kazakh (Kazakhstan) Kazakh Қазақ (Қазақстан)
0453 km_KH Khmer (Cambodia) Khmer ខ្មែរ (កម្ពុជា)
0486 qut_GT K'iche (Guatemala) K'iche K'iche (Guatemala)
0487 rw_RW Kinyarwanda (Rwanda) Kinyarwanda Kinyarwanda (Rwanda)
0041 sw Kiswahili Kiswahili Kiswahili
0441 sw_KE Kiswahili (Kenya) Kiswahili Kiswahili (Kenya)
0057 kok Konkani Konkani कोंकणी
0457 kok_IN Konkani (India) Konkani कोंकणी (भारत)
0012 ko Korean Korean 한국어
0412 ko_KR Korean (Korea) Korean 한국어 (대한민국)
0040 ky Kyrgyz Kyrgyz Кыргыз
0440 ky_KG Kyrgyz (Kyrgyzstan) Kyrgyz Кыргыз (Кыргызстан)
0454 lo_LA Lao (Lao P.D.R.) Lao ລາວ (ສ.ປ.ປ. ລາວ)
0026 lv Latvian Latvian Latviešu
0426 lv_LV Latvian (Latvia) Latvian Latviešu (Latvija)
0027 lt Lithuanian Lithuanian Lietuvių
0427 lt_LT Lithuanian (Lithuania) Lithuanian Lietuvių (Lietuva)
082E wee_DE Lower Sorbian (Germany) Lower Sorbian Dolnoserbšćina (Nimska)
046E lb_LU Luxembourgish (Luxembourg) Luxembourgish Lëtzebuergesch (Luxembourg)
002F mk Macedonian Macedonian (FYROM) Македонски јазик
042F mk_MK Macedonian (Former Yugoslav Republic of Macedonia) Macedonian (FYROM) Македонски јазик (Македонија)
003E ms Malay Malay Bahasa Malaysia
083E ms_BN Malay (Brunei Darussalam) Malay Bahasa Malaysia (Brunei Darussalam)
043E ms_MY Malay (Malaysia) Malay Bahasa Malaysia (Malaysia)
044C ml_IN Malayalam (India) Malayalam മലയാളം (ഭാരതം)
043A mt_MT Maltese (Malta) Maltese Malti (Malta)
0481 mi_NZ Maori (New Zealand) Maori Reo Māori (Aotearoa)
047A arn_CL Mapudungun (Chile) Mapudungun Mapudungun (Chile)
004E mr Marathi Marathi मराठी
044E mr_IN Marathi (India) Marathi मराठी (भारत)
047C moh_CA Mohawk (Mohawk) Mohawk Kanien'kéha (Canada)
0050 mn Mongolian Mongolian (Cyrillic) Монгол хэл
0450 mn_MN Mongolian (Cyrillic, Mongolia) Mongolian (Cyrillic) Монгол хэл (Монгол улс)
0850 mn_Mong_CN Mongolian (Traditional Mongolian, PRC) Mongolian (Traditional Mongolian) ᠮᠣᠩᠭᠤᠯ ᠬᠡᠯᠡ (ᠪᠦᠭᠦᠳᠡ ᠨᠠᠢᠷᠠᠮᠳᠠᠬᠤ ᠳᠤᠮᠳᠠᠳᠤ ᠠᠷᠠᠳ ᠣᠯᠣᠰ)
0461 ne_NP Nepali (Nepal) Nepali नेपाली (नेपाल)
0014 no Norwegian Norwegian (Bokmål) Norsk
0414 nb_NO Norwegian, Bokmål (Norway) Norwegian (Bokmål) Norsk, bokmål (Norge)
0814 nn_NO Norwegian, Nynorsk (Norway) Norwegian (Nynorsk) Norsk, nynorsk (Noreg)
0482 oc_FR Occitan (France) Occitan Occitan (França)
0448 or_IN Oriya (India) Oriya ଓଡ଼ିଆ (ଭାରତ)
0463 ps_AF Pashto (Afghanistan) Pashto پښتو (افغانستان)
0029 fa Persian Persian فارسى
0429 fa_IR Persian Persian فارسى (ايران)
0015 pl Polish Polish Polski
0415 pl_PL Polish (Poland) Polish Polski (Polska)
0016 pt Portuguese Portuguese Português
0416 pt_BR Portuguese (Brazil) Portuguese Português (Brasil)
0816 pt_PT Portuguese (Portugal) Portuguese Português (Portugal)
0046 pa Punjabi Punjabi ਪੰਜਾਬੀ
0446 pa_IN Punjabi (India) Punjabi ਪੰਜਾਬੀ (ਭਾਰਤ)
046B quz_BO Quechua (Bolivia) Quechua Runasimi (Bolivia Suyu)
086B quz_EC Quechua (Ecuador) Quechua Runasimi (Ecuador Suyu)
0C6B quz_PE Quechua (Peru) Quechua Runasimi (Peru Suyu)
0018 ro Romanian Romanian Română
0418 ro_RO Romanian (Romania) Romanian Română (România)
0417 rm_CH Romansh (Switzerland) Romansh Rumantsch (Svizra)
0019 ru Russian Russian Русский
0419 ru_RU Russian (Russia) Russian Русский (Россия)
243B smn_FI Sami, Inari (Finland) Sami (Inari) Sämikielâ (Suomâ)
103B smj_NO Sami, Lule (Norway) Sami (Lule) Julevusámegiella (Vuodna)
143B smj_SE Sami, Lule (Sweden) Sami (Lule) Julevusámegiella (Svierik)
0C3B se_FI Sami, Northern (Finland) Sami (Northern) Davvisámegiella (Suopma)
043B se_NO Sami, Northern (Norway) Sami (Northern) Davvisámegiella (Norga)
083B se_SE Sami, Northern (Sweden) Sami (Northern) Davvisámegiella (Ruoŧŧa)
203B sms_FI Sami, Skolt (Finland) Sami (Skolt) Sääm´ǩiõll (Lää´ddjânnam)
183B sma_NO Sami, Southern (Norway) Sami (Southern) Åarjelsaemiengiele (Nöörje)
1C3B sma_SE Sami, Southern (Sweden) Sami (Southern) Åarjelsaemiengiele (Sveerje)
004F sa Sanskrit Sanskrit संस्कृत
044F sa_IN Sanskrit (India) Sanskrit संस्कृत (भारतम्)
0C1A sr Serbian (Cyrillic, Serbia) Serbian (Cyrillic) Српски (Србија и Црна Гора)
1C1A sr_Cyrl_BA Serbian (Cyrillic, Bosnia and Herzegovina) Serbian (Cyrillic) Српски (Босна и Херцеговина)
7C1A sr_Latn Serbian Serbian (Latin) Srpski
181A sr_Latn_BA Serbian (Latin, Bosnia and Herzegovina) Serbian (Latin) Srpski (Bosna i Hercegovina)
081A sr_Latn_SP Serbian (Latin, Serbia) Serbian (Latin) Srpski (Srbija i Crna Gora)
046C nso_ZA Sesotho sa Leboa (South Africa) Sesotho sa Leboa Sesotho sa Leboa (Afrika Borwa)
0432 tn_ZA Setswana (South Africa) Setswana Setswana (Aforika Borwa)
045B si_LK Sinhala (Sri Lanka) Sinhala සිංහ (ශ්රී ලංකා)
001B sk Slovak Slovak Slovenčina
041B sk_SK Slovak (Slovakia) Slovak Slovenčina (Slovenská republika)
0024 sl Slovenian Slovenian Slovenski
0424 sl_SI Slovenian (Slovenia) Slovenian Slovenski (Slovenija)
000A es Spanish Spanish Español
2C0A es_AR Spanish (Argentina) Spanish Español (Argentina)
400A es_BO Spanish (Bolivia) Spanish Español (Bolivia)
340A es_CL Spanish (Chile) Spanish Español (Chile)
240A es_CO Spanish (Colombia) Spanish Español (Colombia)
140A es_CR Spanish (Costa Rica) Spanish Español (Costa Rica)
1C0A es_DO Spanish (Dominican Republic) Spanish Español (República Dominicana)
300A es_EC Spanish (Ecuador) Spanish Español (Ecuador)
440A es_SV Spanish (El Salvador) Spanish Español (El Salvador)
100A es_GT Spanish (Guatemala) Spanish Español (Guatemala)
480A es_HN Spanish (Honduras) Spanish Español (Honduras)
080A es_MX Spanish (Mexico) Spanish Español (México)
4C0A es_NI Spanish (Nicaragua) Spanish Español (Nicaragua)
180A es_PA Spanish (Panama) Spanish Español (Panamá)
3C0A es_PY Spanish (Paraguay) Spanish Español (Paraguay)
280A es_PE Spanish (Peru) Spanish Español (Perú)
500A es_PR Spanish (Puerto Rico) Spanish Español (Puerto Rico)
0C0A es_ES Spanish (Spain) Spanish Español (España)
540A es_US Spanish (United States) Spanish Español (Estados Unidos)
380A es_UY Spanish (Uruguay) Spanish Español (Uruguay)
200A es_VE Spanish (Venezuela) Spanish Español (Republica Bolivariana de Venezuela)
001D sv Swedish Swedish Svenska
081D sv_FI Swedish (Finland) Swedish Svenska (Finland)
041D sv_SE Swedish (Sweden) Swedish Svenska (Sverige)
005A syr Syriac Syriac ܣܘܪܝܝܐ
045A syr_SY Syriac (Syria) Syriac ܣܘܪܝܝܐ (سوريا)
0428 tg_Cyrl_TJ Tajik (Cyrillic, Tajikistan) Tajik (Cyrillic) Тоҷикӣ (Тоҷикистон)
085F tzm_Latn_DZ Tamazight (Latin, Algeria) Tamazight (Latin) Tamazight (Djazaïr)
0049 ta Tamil Tamil தமிழ்
0449 ta_IN Tamil (India) Tamil தமிழ் (இந்தியா)
0044 tt Tatar Tatar Татар
0444 tt_RU Tatar (Russia) Tatar Татар (Россия)
004A te Telugu Telugu తెలుగు
044A te_IN Telugu (India) Telugu తెలుగు (భారత దేశం)
001E th Thai Thai ไทย
041E th_TH Thai (Thailand) Thai ไทย (ไทย)
0451 bo_CN Tibetan (PRC) Tibetan བོད་ཡིག (ཀྲུང་ཧྭ་མི་དམངས་སྤྱི་མཐུན་རྒྱལ་ཁབ།)
001F tr Turkish Turkish Türkçe
041F tr_TR Turkish (Turkey) Turkish Türkçe (Türkiye)
0442 tk_TM Turkmen (Turkmenistan) Turkmen Türkmençe (Türkmenistan)
0480 ug_CN Uighur (PRC) Uighur ئۇيغۇر يېزىقى (جۇڭخۇا خەلق جۇمھۇرىيىتى)
0022 uk Ukrainian Ukrainian Україньска
0422 uk_UA Ukrainian (Ukraine) Ukrainian Україньска (Україна)
042E wen_DE Upper Sorbian (Germany) Upper Sorbian Hornjoserbšćina (Němska)
0020 ur Urdu Urdu اُردو
0420 ur_PK Urdu (Islamic Republic of Pakistan) Urdu اُردو (پاکستان)
0043 uz Uzbek Uzbek (Latin) U'zbek
0843 uz_Cyrl_UZ Uzbek (Cyrillic, Uzbekistan) Uzbek (Cyrillic) Ўзбек (Ўзбекистон)
0443 uz_Latn_UZ Uzbek (Latin, Uzbekistan) Uzbek (Latin) U'zbek (U'zbekiston Respublikasi)
002A vi Vietnamese Vietnamese Tiếng Việt
042A vi_VN Vietnamese (Vietnam) Vietnamese Tiếng Việt (Việt Nam)
0452 cy_GB Welsh (United Kingdom) Welsh Cymraeg (y Deyrnas Unedig)
0488 wo_SN Wolof (Senegal) Wolof Wolof (Sénégal)
0485 sah_RU Yakut (Russia) Yakut Саха (Россия)
0478 ii_CN Yi (PRC) Yi ꆈꌠꁱꂷ (ꍏꉸꏓꂱꇭꉼꇩ)
046A yo_NG Yoruba (Nigeria) Yoruba Yoruba (Nigeria)
)"
LangData := {}
Loop, Parse, LangInfo, `n, `r
{
F := StrSplit(A_LoopField, A_Tab, A_Space)
LangData[F.2] := {Code: F.1, Lang: F.3, Idiom: F.4, Local: F.5}
If (A_Language = F.1)
SysLang := F.2
}
If (Lang = "ERROR")
Lang := SysLang
GoSub, LoadLangFiles
GoSub, WriteSettings
If (!LangFiles.HasKey(Lang))
{
Lang := RegExReplace(Lang, "_.*")
For i, l in LangFiles
{
If (InStr(i, Lang)=1)
{
Lang := i
break
}
}
}
If (!LangFiles.HasKey(Lang))
Lang := "En"
If (!LangFiles.HasKey(Lang))
{
MsgBox, 20, Error, Missing language files.`n`nWould you like to download them now?
IfMsgBox, No
ExitApp
VerChk := ""
url := "http://www.macrocreator.com/lang"
whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
whr.open("GET", url, false)
; whr.SetRequestHeader("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)")
; whr.SetRequestHeader("Referer", url)
; whr.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
Try
{
whr.Send()
ResponseText := whr.ResponseText
document := ComObjCreate("HTMLfile")
document.write(ResponseText)
VerChk := Eval(document.body.InnerText)[1]
}
If (!IsObject(VerChk))
MsgBox, 16, Pulover's Macro Creator, An error occurred.
FileDelete, %A_Temp%\Lang\*.*
SplashTextOn, 300, 25, Pulover's Macro Creator, Downloading... Please wait.
WinHttpDownloadToFile("http://www.macrocreator.com/lang/Lang.zip", A_Temp)
SplashTextOff
If (!FileExist(A_Temp "\Lang.zip"))
{
MsgBox, 16, Pulover's Macro Creator, An error occurred.
ExitApp
}
FileCreateDir, %A_Temp%\Lang
FileCreateDir, %SettingsFolder%\Lang
FileDelete, %SettingsFolder%\Lang\*.*
UnZip(A_Temp "\Lang.zip", A_Temp "\Lang\")
FileCopy, %A_Temp%\Lang\*.lang, %SettingsFolder%\Lang\, 1
FileDelete, %A_Temp%\Lang.zip
FileRemoveDir, %A_Temp%\Lang
LangVersion := VerChk.LangRev, LangLastCheck := VerChk.LangRev
GoSub, WriteSettings
Run, %A_ScriptFullPath%
ExitApp
}
CurrentLang := Lang
AppName := "Pulover's Macro Creator"
, HeadLine := "; This script was created using Pulover's Macro Creator`n; www.macrocreator.com"
, PmcHead := "/*"
. "`nPMC File Version " CurrentVersion
. "`n---[Do not edit anything in this section]---`n`n"
If (KeepDefKeys = 1)
DefAutoKey := AutoKey, DefManKey := ManKey
GoSub, LoadLang
#Include <Definitions>
#Include <WordList>
UserDefFunctions := SyHi_UserDef " "
GoSub, ObjCreate
ToggleMode := ToggleC ? "T" : "P"
If (ColSizes = "0,0,0,0,0,0,0,0,0,0")
ColSizes := "70,185,335,60,60,100,150,225,85,50"
Loop, Parse, ColSizes, `,
Col_%A_Index% := A_LoopField
Loop, Parse, ShowBands, `,
ShowBand%A_Index% := A_LoopField
RegRead, DClickSpd, HKEY_CURRENT_USER, Control Panel\Mouse, DoubleClickSpeed
DClickSpd := Round(DClickSpd * 0.001, 1)
RowCheckInProgress := false
;##### Menus: #####
Gui, 1:+LastFound
Gui, 1:Default
Menu, Tray, NoStandard
GoSub, RecentFiles
GoSub, CreateMenuBar
Menu, MouseB, Add, Click, HelpB
Menu, MouseB, Add, ControlClick, HelpB
Menu, MouseB, Add
Menu, MouseB, Add, Variables and Expressions, HelpB
Menu, MouseB, Add, Built-in Variables, :BuiltInMenu
Menu, MouseB, Icon, Click, %ResDllPath%, 24
Menu, TextB, Add, Send / SendRaw, HelpB
Menu, TextB, Add, ControlSend, HelpB
Menu, TextB, Add, ControlSetText, HelpB
Menu, TextB, Add, Clipboard, HelpB
Menu, TextB, Add
Menu, TextB, Add, Variables and Expressions, HelpB
Menu, TextB, Add, Built-in Variables, :BuiltInMenu
Menu, TextB, Icon, Send / SendRaw, %ResDllPath%, 24
Menu, ControlB, Add, Control, HelpB
Menu, ControlB, Add, ControlFocus, HelpB
Menu, ControlB, Add, ControlGet, HelpB
Menu, ControlB, Add, ControlGetFocus, HelpB
Menu, ControlB, Add, ControlGetPos, HelpB
Menu, ControlB, Add, ControlGetText, HelpB
Menu, ControlB, Add, ControlMove, HelpB
Menu, ControlB, Add, ControlSetText, HelpB
Menu, ControlB, Add
Menu, ControlB, Add, Variables and Expressions, HelpB
Menu, ControlB, Add, Built-in Variables, :BuiltInMenu
Menu, ControlB, Icon, Control, %ResDllPath%, 24
Menu, SpecialB, Add, List of Keys, SpecialB
Menu, SpecialB, Icon, List of Keys, %ResDllPath%, 24
Menu, PauseB, Add, Sleep, HelpB
Menu, PauseB, Add
Menu, PauseB, Add, Variables and Expressions, HelpB
Menu, PauseB, Add, Built-in Variables, :BuiltInMenu
Menu, PauseB, Icon, Sleep, %ResDllPath%, 24
Menu, MsgboxB, Add, MsgBox, HelpB
Menu, MsgboxB, Add
Menu, MsgboxB, Add, Variables and Expressions, HelpB
Menu, MsgboxB, Add, Built-in Variables, :BuiltInMenu
Menu, MsgboxB, Icon, MsgBox, %ResDllPath%, 24
Menu, KeyWaitB, Add, KeyWait, HelpB
Menu, KeyWaitB, Add
Menu, KeyWaitB, Add, Variables and Expressions, HelpB
Menu, KeyWaitB, Add, Built-in Variables, :BuiltInMenu
Menu, KeyWaitB, Icon, KeyWait, %ResDllPath%, 24
Menu, WindowB, Add, WinActivate, HelpB
Menu, WindowB, Add, WinActivateBottom, HelpB
Menu, WindowB, Add, WinClose, HelpB
Menu, WindowB, Add, WinGet, HelpB
Menu, WindowB, Add, WinGetClass, HelpB
Menu, WindowB, Add, WinGetText, HelpB
Menu, WindowB, Add, WinGetTitle, HelpB
Menu, WindowB, Add, WinGetPos, HelpB
Menu, WindowB, Add, WinHide, HelpB
Menu, WindowB, Add, WinKill, HelpB
Menu, WindowB, Add, WinMaximize, HelpB
Menu, WindowB, Add, WinMinimize, HelpB
Menu, WindowB, Add, WinMinimizeAll / WinMinimizeAllUndo, HelpB
Menu, WindowB, Add, WinMove, HelpB
Menu, WindowB, Add, WinRestore, HelpB
Menu, WindowB, Add, WinSet, HelpB
Menu, WindowB, Add, WinShow, HelpB
Menu, WindowB, Add, WinWait, HelpB
Menu, WindowB, Add, WinWaitActive / WinWaitNotActive, HelpB
Menu, WindowB, Add, WinWaitClose, HelpB
Menu, WindowB, Add
Menu, WindowB, Add, Variables and Expressions, HelpB
Menu, WindowB, Add, Built-in Variables, :BuiltInMenu
Menu, WindowB, Icon, WinActivate, %ResDllPath%, 24
Menu, ImageB, Add, ImageSearch, HelpB
Menu, ImageB, Add, PixelSearch, HelpB
Menu, ImageB, Add
Menu, ImageB, Add, Variables and Expressions, HelpB
Menu, ImageB, Add, Built-in Variables, :BuiltInMenu
Menu, ImageB, Icon, ImageSearch, %ResDllPath%, 24
Loop, Parse, FileCmdList, |
{
If (A_LoopField = "")
continue
If (InStr(A_LoopField, "File")=1 || InStr(A_LoopField, "Drive")=1)
{
RunList_File .= A_LoopField "|"
Menu, m_File, Add, %A_LoopField%, HelpB
}
Else If (InStr(A_LoopField, "Sort")=1 || InStr(A_LoopField, "String")=1
|| InStr(A_LoopField, "Split")=1)
{
If (InStr(A_LoopField, "Left") || InStr(A_LoopField, "Lower"))
{
LastCmd := A_LoopField " / "
continue
}
Else
{
Menu, m_String, Add, %LastCmd%%A_LoopField%, HelpB
LastCmd := ""
}
RunList_String .= A_LoopField "|"
}
Else If (!InStr(A_LoopField, "Run") && (InStr(A_LoopField, "Wait")
|| (A_LoopField = "Input")))
{
Menu, m_Wait, Add, %A_LoopField%, HelpB
RunList_Wait .= A_LoopField "|"
}
Else If A_LoopField contains Box,Tip,Progress,Splash
{
Menu, m_Dialogs, Add, %A_LoopField%, HelpB
RunList_Dialogs .= A_LoopField "|"
}
Else If (InStr(A_LoopField, "Reg") || InStr(A_LoopField, "Ini")=1)
{
Menu, m_Registry, Add, %A_LoopField%, HelpB
RunList_Registry .= A_LoopField "|"
}
Else If (InStr(A_LoopField, "Sound")=1)
{
Menu, m_Sound, Add, %A_LoopField%, HelpB
RunList_Sound .= A_LoopField "|"
}
Else If (InStr(A_LoopField, "Group")=1)
{
Menu, m_Group, Add, %A_LoopField%, HelpB
RunList_Group .= A_LoopField "|"
}
Else If (InStr(A_LoopField, "Env")=1)
{
Menu, m_Vars, Add, %A_LoopField%, HelpB
RunList_Vars .= A_LoopField "|"
}
Else If (InStr(A_LoopField, "Get"))
{
Menu, m_Get, Add, %A_LoopField%, HelpB
RunList_Get .= A_LoopField "|"
}
Else If A_LoopField not contains Run,Process,Shutdown
{
Menu, m_Misc, Add, %A_LoopField%, HelpB
RunList_Misc .= A_LoopField "|"
}
}
Menu, RunB, Add, Run / RunWait, HelpB
Menu, RunB, Add, RunAs, HelpB
Menu, RunB, Add, Process, HelpB
Menu, RunB, Add, Shutdown, HelpB
Menu, RunB, Add, File, :m_File
Menu, RunB, Add, String, :m_String
Menu, RunB, Add, Get Info, :m_Get
Menu, RunB, Add, Wait, :m_Wait
Menu, RunB, Add, Window Groups, :m_Group
Menu, RunB, Add, Messages, :m_Dialogs
Menu, RunB, Add, Reg && Ini, :m_Registry
Menu, RunB, Add, Sound, :m_Sound
Menu, RunB, Add, Variables, :m_Vars
Menu, RunB, Add, Misc., :m_Misc
Menu, RunB, Add
Menu, RunB, Add, Variables and Expressions, HelpB
Menu, RunB, Add, Built-in Variables, :BuiltInMenu
Menu, RunB, Icon, Run / RunWait, %ResDllPath%, 24
Menu, ComLoopB, Add, Loop, LoopB
Menu, ComLoopB, Add, While, LoopB
Menu, ComLoopB, Add, For, LoopB
Menu, ComLoopB, Add, Until, LoopB
Menu, ComLoopB, Add, Loop`, Parse, LoopB
Menu, ComLoopB, Add, Loop`, Files, LoopB
Menu, ComLoopB, Add, Loop`, Read, LoopB
Menu, ComLoopB, Add, Loop`, Reg, LoopB
Menu, ComLoopB, Add, Break, HelpB
Menu, ComLoopB, Add, Continue, HelpB
Menu, ComLoopB, Add
Menu, ComLoopB, Add, Variables and Expressions, HelpB
Menu, ComLoopB, Add, Built-in Variables, :BuiltInMenu
Menu, ComLoopB, Icon, Loop, %ResDllPath%, 24
Menu, ComGotoB, Add, Goto, HelpB
Menu, ComGotoB, Add, Gosub, HelpB
Menu, ComGotoB, Add, Labels, HelpB
Menu, ComGotoB, Add
Menu, ComGotoB, Add, Variables and Expressions, HelpB
Menu, ComGotoB, Add, Built-in Variables, :BuiltInMenu
Menu, ComGotoB, Icon, Goto, %ResDllPath%, 24
Menu, TimedLabelB, Add, SetTimer, HelpB
Menu, TimedLabelB, Add
Menu, TimedLabelB, Add, Variables and Expressions, HelpB
Menu, TimedLabelB, Add, Built-in Variables, :BuiltInMenu
Menu, TimedLabelB, Icon, SetTimer, %ResDllPath%, 24
Menu, IfStB, Add, IfWinActive / IfWinNotActive, HelpB
Menu, IfStB, Add, IfWinExist / IfWinNotExist, HelpB
Menu, IfStB, Add, IfExist / IfNotExist, HelpB
Menu, IfStB, Add, IfInString / IfNotInString, HelpB
Menu, IfStB, Add, IfMsgBox, HelpB
Menu, IfStB, Add, If Statements, HelpB
Menu, IfStB, Add
Menu, IfStB, Add, Variables and Expressions, HelpB
Menu, IfStB, Add, Built-in Variables, :BuiltInMenu
Menu, IfStB, Icon, IfWinActive / IfWinNotActive, %ResDllPath%, 24
Menu, AsVarB, Add, Variables and Expressions, HelpB
Menu, AsVarB, Add, Arrays, HelpB
Menu, AsVarB, Add, Objects, HelpB
Menu, AsVarB, Add
Menu, AsVarB, Add, Built-in Variables, :BuiltInMenu
Menu, AsVarB, Icon, Variables and Expressions, %ResDllPath%, 24
Menu, AsFuncB, Add, Built-in Functions, HelpB
Menu, AsFuncB, Add, Arrays, HelpB
Menu, AsFuncB, Add, Objects, HelpB
Menu, AsFuncB, Add, Object Methods, HelpB
Menu, AsFuncB, Add
Menu, AsFuncB, Add, Variables and Expressions, HelpB
Menu, AsFuncB, Add, Built-in Variables, :BuiltInMenu
Menu, AsFuncB, Icon, Built-in Functions, %ResDllPath%, 24
Menu, EmailB, Add, COM, ComB
Menu, EmailB, Add, COM Object Reference, ComB
Menu, EmailB, Add, CDO (Microsoft MSDN), ComB
Menu, EmailB, Add
Menu, EmailB, Add, Variables and Expressions, HelpB
Menu, EmailB, Add, Built-in Variables, :BuiltInMenu
Menu, EmailB, Icon, COM, %ResDllPath%, 24
Menu, DownloadB, Add, COM, ComB
Menu, DownloadB, Add, COM Object Reference, ComB
Menu, DownloadB, Add, WinHttpRequest Object (Microsoft MSDN), ComB
Menu, DownloadB, Add
Menu, DownloadB, Add, Variables and Expressions, HelpB
Menu, DownloadB, Add, Built-in Variables, :BuiltInMenu
Menu, DownloadB, Icon, COM, %ResDllPath%, 24
Menu, ZipB, Add, COM, ComB
Menu, ZipB, Add, COM Object Reference, ComB
Menu, ZipB, Add, Shell Object (Microsoft MSDN), ComB
Menu, ZipB, Add
Menu, ZipB, Add, Variables and Expressions, HelpB
Menu, ZipB, Add, Built-in Variables, :BuiltInMenu
Menu, ZipB, Icon, COM, %ResDllPath%, 24
Menu, IEComB, Add, COM, ComB
Menu, IEComB, Add, COM Object Reference, ComB
Menu, IEComB, Add, Basic Webpage COM Tutorial, ComB
Menu, IEComB, Add, IWebBrowser2 Interface (MSDN), ComB
Menu, IEComB, Add
Menu, IEComB, Add, Variables and Expressions, HelpB
Menu, IEComB, Add, Built-in Variables, :BuiltInMenu
Menu, IEComB, Icon, COM, %ResDllPath%, 24
Menu, SendMsgB, Add, PostMessage / SendMessage, HelpB
Menu, SendMsgB, Add, Message List, SendMsgB
Menu, SendMsgB, Add, Microsoft MSDN, SendMsgB
Menu, SendMsgB, Add
Menu, SendMsgB, Add, Variables and Expressions, HelpB
Menu, SendMsgB, Add, Built-in Variables, :BuiltInMenu
Menu, SendMsgB, Icon, PostMessage / SendMessage, %ResDllPath%, 24
Menu, UserFuncB, Add, Functions, HelpB
Menu, UserFuncB, Add
Menu, UserFuncB, Add, Variables and Expressions, HelpB
Menu, UserFuncB, Add, Built-in Variables, :BuiltInMenu
Menu, UserFuncB, Icon, Functions, %ResDllPath%, 24
Menu, IfDirB, Add, #IfWinActive / #IfWinExist, HelpB
Menu, IfDirB, Icon, #IfWinActive / #IfWinExist, %ResDllPath%, 24
Menu, ExportG, Add, Hotkeys, ExportG
Menu, ExportG, Add, Hotstrings, ExportG
Menu, ExportG, Add, List of Keys, ExportG
Menu, ExportG, Add, ComObjCreate, ExportG
Menu, ExportG, Add, ComObjActive, ExportG
Menu, ExportG, Add, Auto-execute Section, ExportG
Menu, ExportG, Add, #IfWinActive / #IfWinExist, HelpB
Menu, ExportG, Icon, Hotkeys, %ResDllPath%, 24
;##### Main Window: #####
Gui, +Resize +MinSize310x175 +HwndPMCWinID
Gui, Add, Custom, ClassToolbarWindow32 hwndhTbFile gTbFile 0x0800 0x0100 0x0040 0x0008 0x0004
Gui, Add, Custom, ClassToolbarWindow32 hwndhTbRecPlay gTbRecPlay 0x0800 0x0040 0x0008 0x0004
Gui, Add, Custom, ClassToolbarWindow32 hwndhTbCommand gTbCommand 0x0800 0x0100 0x0040 0x0008 0x0004
Gui, Add, Custom, ClassToolbarWindow32 hwndhTbSettings gTbSettings 0x0800 0x0100 0x0040 0x0008 0x0004
Gui, Add, Custom, ClassToolbarWindow32 hwndhTbEdit gTbEdit 0x0800 0x0100 0x0040 0x0008 0x0004
If (TbNoTheme)
Gui, -Theme
Gui, Add, Custom, ClassReBarWindow32 hwndhRbMain vcRbMain gRB_Notify 0x0400 0x0040 0x8000
Gui, +Theme