-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorzFilePoster.ahkx
616 lines (552 loc) · 17.8 KB
/
orzFilePoster.ahkx
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
/*
[orzTech]
SourceType=AutoHotkeyL
*/
;Temp Password: sifcjsdijfvuisdnofvmdsofmo
ApplicationName=orzFilePoster GUI
ApplicationVersion=1.0.0.79
ProductName=orzFilePoster
ProductVersion=1.0.0.79
ProductHomepageURL=http://orztech.com/softwares/fileposter
ProductSupportURL=http://orztech.com/support/
ProductSupportEmail=support+FilePoster@orztech.com
Author0=2
Author1=Yeechan Lu
Author2=Hongyu Pan
Acknowledgements=http://www.autohotkey.com/forum/topic69642.html (LV_SortArrow by Solar)`nhttp://quick.mixnmojo.com/usb-disk-ejector (USB Disk Ejector by bengorman)`nhttp://www.autohotkey.com/forum/topic43122.html (autoByteFormat by animeaime)
Main()
return
Main()
{
Gosub Main
}
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance ignore
#Include .\_common.new\orzTechCommon.ahkx
#Include .\_common.new\orzTechSettings.ahkx
#Include .\_common.new\orzTechLanguages.ahkx
#Include .\_common.new\orzTechGUI.ahkx
#Include .\_common.new\GUIAnchor.ahk
#Include .\_common.new\orzTechAbout.ahkx
Main:
FileInstall, orzFilePosterCopier.exe, %A_ScriptDir%\orzFilePosterCopier.exe, 1
FileInstall, Eject.exe, %A_ScriptDir%\Eject.exe, 1
FileEncoding, UTF-8-RAW
SetFormat, float, 0.2
orzTechLanguagesLoadLanguageSettings()
orzTechLanguagesInclude("orzTechSettings")
orzTechLanguagesInclude("orzTechAbout")
;orzTechLanguagesInclude("orzUnplugged")
orzTechSettingsLoad()
Menu, Tray, NoIcon
Menu, Tray, NoStandard
If A_IsCompiled
Menu, Tray, Icon, %A_ScriptFullPath%
Menu, Tray, Tip, %ApplicationName% %ApplicationVersion%
Menu, Tray, Add, 停止分发(&S), StopDistribute
;change: 增加在右键菜单直接打开 eject.exe 的选项
Menu, Tray, Add, 快速弹出U盘(&E), RunEjectAppGUI
Menu, Tray, Add,
Menu, Tray, Add, 退出(&X), FLGuiClose
Menu, FileListBackgroundPopup, Add, 添加文件(&A)..., FileListAddFile
Menu, FileListBackgroundPopup, Default, 添加文件(&A)...
Menu, FileListBackgroundPopup, Add, 添加文件夹(&D)..., FileListAddDirectory
Menu, FileListBackgroundPopup, Add
Menu, FileListBackgroundPopup, Add, 关于(&Z)..., orzTechAbout
;change: 打开文件所在文件夹
Menu, FileListPopup, Add, 打开(&O), FileListOpen
Menu, FileListPopup, Default, 打开(&O)
Menu, FileListPopup, Add, 打开所在文件夹(&F), FileListOpenFolder
Menu, FileListPopup, Add
Menu, FileListPopup, Add, 移除(&D), FileListRemove
Menu, FileListPopup, Add, 修改目标路径(&R), FileListRename
Menu, FileListPopup, Add
Menu, FileListPopup, Add, 属性(&P), FileListProperties
FileListGUIID := orzTechGUI("A")
If (FileListGUIID == 0)
Return
Gui, %FileListGUIID%:+LabelFLGui
Gui, %FileListGUIID%:Font, s9 q5
Gui, %FileListGUIID%:Font, , MS Sans Serif
Gui, %FileListGUIID%:Font, , Arial
Gui, %FileListGUIID%:Font, , Verdana
Gui, %FileListGUIID%:Font, , Tahoma
Gui, %FileListGUIID%:Font, , Segoe UI
Gui, %FileListGUIID%:Add, Listview, -ReadOnly gFileListEvent vFileList AltSubmit hwndhFileList W600 R15, 目的路径|大小|源文件
; It's something for fun
;GuiControl, %FileListGUIID%:+List, FileList
Gui, %FileListGUIID%:Add, Button, vButtonStartDistribute gStartDistribute default section, 开始分发(&S)
Gui, %FileListGUIID%:Add, Button, vButtonFileListAddFile gFileListAddFile ys, 添加文件(&A)...
Gui, %FileListGUIID%:Add, Button, vButtonFileListAddDirectory gFileListAddDirectory ys, 添加文件夹(&D)...
Gui, %FileListGUIID%:Add, Button, vButtonFileListRemove gFileListRemove ys, 删除/清空(&D)
Gui, %FileListGUIID%:Add, Button, vButtonorzTechAbout gorzTechAbout ys, 关于(&Z)...
LV_ModifyCol(1, "250")
LV_ModifyCol(2, "70 Float")
LV_ModifyCol(3, "250")
Gosub FileListImportFromFile
Gui, %FileListGUIID%:+Resize +MinSize
Gui, %FileListGUIID%:Show,, %ApplicationName%
Gui, %FileListGUIID%:+LastFound
WinGet, FileListGuiWID, ID
GroupAdd, FLGuiHotkey, ahk_id %FileListGuiWID%
Return
FileListEvent:
If (A_GuiEvent = "ColClick")
LV_SortArrow(hFileList, A_EventInfo)
If (A_GuiEvent = "DoubleClick")
{
If (LV_GetCount("Selected") = 0)
Gosub FileListAddFile
Else
Gosub FileListOpen
}
If (A_GuiEvent = "e")
{
Gui, ListView, FileList
LV_GetText(FileList_A_Index_Text, A_EventInfo)
LV_GetText(FileList_A_Index_Text_3, A_EventInfo, 3)
SplitPath, FileList_A_Index_Text_3, OriginalFileName
FileList_A_Index_Text := GetCorrectDestFileName(FileList_A_Index_Text, OriginalFileName)
LV_Modify(A_EventInfo, "", FileList_A_Index_Text)
If (FileListCount(FileList_A_Index_Text) > 1)
{
FileFullName := "X:" . FileList_A_Index_Text
SplitPath, FileFullName, FileName, FileDirectory, FileExt, FileNameWithoutExt
StringReplace, FileDirectory, FileDirectory, X:, , All
FileNumber := 1
while FileListInclude(GetCorrectDestFileName(FileDirectory . "\" . GetNumberedFileName(FileNameWithoutExt, FileNumber) . "." . FileExt)) != false
{
FileNumber := FileNumber + 1
}
FileList_A_Index_Text := GetCorrectDestFileName(FileDirectory . "\" . GetNumberedFileName(FileNameWithoutExt, FileNumber) . "." . FileExt)
LV_Modify(A_EventInfo, "", FileList_A_Index_Text)
}
}
Return
FileListAddFile:
GuiControl, -Redraw, FileList
FileSelectFile, Files, M3
if Files =
{}
Else
{
Loop, parse, Files, `n
{
If (A_Index != 1)
{
FileListAdd(FilesBasePath . "\" . A_LoopField)
}
Else
{
FilesBasePath := A_LoopField
}
}
}
GuiControl, +Redraw, FileList
Return
FileListAddDirectory:
FileSelectFolder, Folder, , 6
if Folder =
Return
FileListAddDir(Folder)
Return
FileListAddDir(Folder)
{
GuiControl, -Redraw, FileList
Loop, %Folder%, 2
{
DirectoryName := A_LoopFileName
DirectoryPath := A_LoopFileLongPath
}
If (DirectoryPath = "")
DirectoryPath := Folder
DirectoryBasePath := DirectoryName
Loop, %DirectoryPath%\*.*, , 1
{
If (Mod(A_Index, 100) = 0)
ToolTip, Found %A_Index%+ items...%A_LoopFileLongPath%
StringReplace, DirectoryItemBasePath, A_LoopFileDir, %DirectoryPath%, %DirectoryBasePath%\, All
FileListAdd(A_LoopFileLongPath, DirectoryItemBasePath)
}
ToolTip
GuiControl, +Redraw, FileList
}
;change: 未选中项目时,则清空列表
FileListRemove:
GuiControl, -Redraw, FileList
RowNumber = 0
If (LV_GetCount("Selected") = 0)
{
MsgBox, 292, 清空文件列表, 是否清空文件列表?
IfMsgBox, Yes
LV_Delete()
}
else
{
Loop
{
RowNumber := LV_GetNext(0)
if not RowNumber
break
LV_Delete(RowNumber)
}
}
GuiControl, +Redraw, FileList
Return
FileListOpen:
If (LV_GetCount("Selected") > 1)
{
;change: 除去重复的对话框选项*2
Gui +OwnDialogs
MsgBox, 308, 正在打开多个文件, 您正试图一次性打开多个文件,然而这可能会导致系统缓慢。`n`n是否继续?
IfMsgBox, No
return
}
RowNumber = 0
Loop
{
RowNumber := LV_GetNext(RowNumber)
if not RowNumber
break
LV_GetText(SourceName, RowNumber, 3)
Run, "%SourceName%", , UseErrorLevel
if ErrorLevel
{
Gui +OwnDialogs
MsgBox 48, %SourceName%, 无法为“%SourceName%”执行指定的操作。
}
}
Return
FileListOpenFolder:
If (LV_GetCount("Selected") > 1)
{
Gui +OwnDialogs
MsgBox, 308, 正在打开多个文件, 您正试图一次性打开多个文件所在的文件夹,然而这可能会导致系统缓慢。`n`n是否继续?
IfMsgBox, No
return
}
RowNumber = 0
Loop
{
RowNumber := LV_GetNext(RowNumber)
if not RowNumber
break
LV_GetText(SourceName, RowNumber, 3)
Run, Explorer.exe /select`,"%SourceName%", , UseErrorLevel
if ErrorLevel
{
Gui +OwnDialogs
MsgBox 48, %SourceName%, 无法为“%SourceName%”执行指定的操作。
}
}
Return
FileListRename:
GuiControl, Focus, FileList
Send {F2}
Return
FileListProperties:
If (LV_GetCount("Selected") > 1)
{
Gui +OwnDialogs
MsgBox, 308, 正在打开多个文件, 您正试图一次性打开多个文件,然而这可能会导致系统缓慢。`n`n是否继续?
IfMsgBox, No
return
else IfMsgBox, Cancel
return
}
RowNumber = 0
Loop
{
RowNumber := LV_GetNext(RowNumber)
if not RowNumber
break
LV_GetText(SourceName, RowNumber, 3)
Run, properties "%SourceName%", , UseErrorLevel
if ErrorLevel
{
Gui +OwnDialogs
MsgBox 48, %SourceName%, 无法为“%SourceName%”执行指定的操作。
}
}
Return
FileListAdd(FileFullName, BasePath = "\")
{
IfNotExist, %FileFullName%
Return
StringReplace, FileFullName, FileFullName, \\, \, All
Loop %FileFullName%
FileFullName = %A_LoopFileLongPath%
SplitPath, FileFullName, FileName, FileDirectory, FileExt, FileNameWithoutExt, FileDrive
FileGetSize, FileSize, %FileFullName%,
SetFormat, float, 0.2
FileSizeKB := FileSize / 1024
DestFileName := FileNameWithoutExt
FileNumber := 1
while FileListInclude(GetCorrectDestFileName(BasePath . "\" . GetNumberedFileName(DestFileName, FileNumber) . "." . FileExt)) != false
{
FileNumber := FileNumber + 1
}
LV_Add("", GetCorrectDestFileName(BasePath . "\\\\" . GetNumberedFileName(DestFileName, FileNumber) . "." . FileExt), FileSizeKB . " KB", FileFullName)
}
GetCorrectDestFileName(DestFileName, OriginalFileName = "file.ext")
{
DestFileName := DestFileName . "\"
while RegExMatch(DestFileName, "\\\.{1,}\\") != 0
{
DestFileName := RegExReplace(DestFileName, "\\[^\\]{1,}\\\.{3,}", "\\$1")
DestFileName := RegExReplace(DestFileName, "\\[^\\]{1,}\\\.\.", "")
DestFileName := RegExReplace(DestFileName, "\\([^\\]{1,})\\\.", "\\$1")
DestFileName := RegExReplace(DestFileName, "^(\\\.{1,}){1,}\\", "\")
}
DestFileName := RegExReplace(DestFileName, "\\{2,}", "\")
If (SubStr(DestFileName, 0, 1) == "\")
DestFileName := SubStr(DestFileName, 1, -1)
If (SubStr(DestFileName, 1, 1) != "\")
DestFileName := "\" . DestFileName
If (DestFileName = "\")
DestFileName := "\" . OriginalFileName
DestFileName := RegExReplace(DestFileName, "\.{1,}$", "")
Return DestFileName
}
GetNumberedFileName(DestFileName, FileNumber)
{
If (FileNumber = 1)
Return DestFileName
Else
Return DestFileName . " (" . FileNumber . ")"
}
FileListInclude(DestFileName) {
DestFileName := DestFileName
StringLower, DestFileName, DestFileName
Gui, ListView, FileList
Loop % LV_GetCount()
{
LV_GetText(Text, A_Index)
StringLower, Text, Text
If (Text = DestFileName)
return A_Index
}
return false
}
FileListCount(DestFileName) {
CountNumber = 0
StringLower, DestFileName, DestFileName
Gui, ListView, FileList
Loop % LV_GetCount()
{
LV_GetText(Text, A_Index)
StringLower, Text, Text
If (Text == DestFileName)
CountNumber := CountNumber + 1
}
return CountNumber
}
FLGuiContextMenu:
if A_GuiControl <> FileList
return
If (LV_GetCount("Selected") = 0)
Menu, FileListBackgroundPopup, Show, %A_GuiX%, %A_GuiY%
Else
Menu, FileListPopup, Show, %A_GuiX%, %A_GuiY%
return
FLGuiDropFiles:
Loop, parse, A_GuiEvent, `n
{
If (InStr(FileExist(A_LoopField), "D"))
FileListAddDir(A_LoopField)
Else
FileListAdd(A_LoopField)
}
Return
FLGuiClose:
FLGuiEscape:
Gosub FileListExportToFile
ExitApp
Return
RunEjectAppGUI:
Run, eject.exe
Return
FLGuiSize:
Anchor("FileList", "wh")
Anchor("ButtonStartDistribute", "y")
Anchor("ButtonFileListAddFile", "y")
Anchor("ButtonFileListAddDirectory", "y")
Anchor("ButtonFileListRemove", "y")
Anchor("ButtonorzTechAbout", "y")
Return
; LV_SortArrow by Solar. http://www.autohotkey.com/forum/viewtopic.php?t=69642
; h = ListView handle
; c = 1 based index of the column
; d = Direction to set the arrow. "asc" or "up". "desc" or "down".
LV_SortArrow(h, c, d="")
{
static uPtr, ptrSize, lvColumn, LVM_GETCOLUMN, LVM_SETCOLUMN
If (!uPtr) {
uPtr := A_PtrSize ? "uptr" : "uint", PtrSize := A_PtrSize ? A_PtrSize : 4, LVM_GETCOLUMN := A_IsUnicode ? 4191 : 4121, LVM_SETCOLUMN := A_IsUnicode ? 4192 : 4122
VarSetCapacity(lvColumn, PtrSize + 4)
NumPut(1, lvColumn) ; mask
}
c -= 1 ; convert to 0 based index
DllCall("SendMessage", uPtr, h, uPtr, LVM_GETCOLUMN, uPtr, c, uPtr, &lvColumn)
If ((fmt := NumGet(lvColumn, 4, "int")) & 1024) { ; if up arrow is set
If (d && d = "asc" || d = "up")
Return ; up arrow already set
NumPut(fmt & ~1024 | 512, lvColumn, 4, "int") ; fmt
}
Else If (fmt & 512) { ; if down arrow is set
If (d && d = "desc" || d = "down")
Return ; down arrow already set
NumPut(fmt & ~512 | 1024, lvColumn, 4, "int") ; fmt
}
Else { ; no arrow set. check other columns and remove arrow before setting up arrow
hdrH := DllCall("SendMessage", uPtr, h, uPtr, 4127) ; LVM_GETHEADER
Loop % DllCall("SendMessage", uPtr, hdrH, uPtr, 4608) { ; HDM_GETITEMCOUNT
If ((i := A_Index - 1) = c) ; skip the column that we already checked
Continue
DllCall("SendMessage", uPtr, h, uPtr, LVM_GETCOLUMN, uPtr, i, uPtr, &lvColumn)
NumPut(NumGet(lvColumn, 4, "int") & ~1536, lvColumn, 4, "int") ; fmt
DllCall("SendMessage", uPtr, h, uPtr, LVM_SETCOLUMN, uPtr, i, uPtr, &lvColumn)
}
NumPut(fmt | ((d && d = "desc" || d = "down") ? 512 : 1024), lvColumn, 4, "int") ; fmt
}
Return DllCall("SendMessage", uPtr, h, uPtr, LVM_SETCOLUMN, uPtr, c, uPtr, &lvColumn)
}
;converts Size (in bytes) to byte(s)/KB/MB/GB/TB (uses best option)
;decimalPlaces is the number of decimal places to round
autoByteFormat(size, decimalPlaces = 1)
{
static size1 = "KB", size2 = "MB", size3 = "GB", size4 = "TB"
sizeIndex := 0
while (size >= 1024)
{
sizeIndex++
size /= 1024.0
if (sizeIndex = 4)
break
}
return (sizeIndex = 0) ? size " 字节" . (size != 1 ? "s" : "")
: round(size, decimalPlaces) . " " . size%sizeIndex%
}
StartDistribute:
;change: 增加列表空时的提示
If (LV_GetCount() = 0)
{
MsgBox, 308, 开始文件分发, 文件列表中没有要分发的文件,这会导致U盘插入后立刻被弹出。`n`n是否继续?
IfMsgBox, No
return
}
Gui, %FileListGUIID%:Submit
Menu, Tray, Icon
Gosub FileListExportToFile
;change: 增加使用提示
TrayTip, 文件分发已开始, 请直接插入U盘。`n如需停止,请右键点击托盘图标。
Goto WaitForNewDrive
Return
StopDistribute:
ExitWaitForNewDrive := true
Menu, Tray, NoIcon
Gui, %FileListGUIID%:Show
Return
FileListImportFromFile:
ExportedFileName = orzFilePoster.lst
Loop, read, %ExportedFileName%
{
StringSplit, ImportFileName, A_LoopReadLine, %A_Tab%
SourceFileName = %ImportFileName1%
DestFileName = %ImportFileName2%
IfExist, %SourceFileName%
{
If (FileListCount(GetCorrectDestFileName(DestFileName)) > 1)
{
FileFullName := "X:" . DestFileName
SplitPath, FileFullName, FileName, FileDirectory, FileExt, FileNameWithoutExt
StringReplace, FileDirectory, FileDirectory, X:, , All
FileNumber := 1
while FileListInclude(GetCorrectDestFileName(FileDirectory . "\" . GetNumberedFileName(FileNameWithoutExt, FileNumber) . "." . FileExt)) != false
{
FileNumber := FileNumber + 1
}
DestFileName := GetCorrectDestFileName(FileDirectory . "\" . GetNumberedFileName(FileNameWithoutExt, FileNumber) . "." . FileExt)
}
FileGetSize, FileSize, %SourceFileName%,
SetFormat, float, 0.2
FileSizeKB := FileSize / 1024
Loop %SourceFileName%
SourceFileName = %A_LoopFileLongPath%
LV_Add("", DestFileName, FileSizeKB . " KB", SourceFileName)
}
}
Return
FileListExportToFile:
ExportedFileName = orzFilePoster.lst
IfExist, %ExportedFileName%
FileDelete, %ExportedFileName%
Gui, ListView, FileList
Loop % LV_GetCount()
{
LV_GetText(SourceName, A_Index, 3)
LV_GetText(DestName, A_Index)
FileAppend, %SourceName%`t%DestName%`n, %ExportedFileName%
}
Return
WaitForNewDrive:
DriveGet, ListOld, list
Loop
{
Sleep, 1000
if (ExitWaitForNewDrive = true)
{
ExitWaitForNewDrive := false
Break
}
DriveGet, ListNew, List
if StrLen(ListNew) > StrLen(ListOld)
{
Loop, Parse, ListNew
{
StrNum := InStr(ListOld, A_LoopField)
If StrNum = 0
{
DriveGet, DriveType, Type, %A_LoopField%:
If (DriveType != "CDROM")
{
DriveGet, DriveLabel, Label, %A_LoopField%:
DriveGet, DriveCapacity, capacity, %A_LoopField%:
DriveSpaceFree, DriveFree, %A_LoopField%:
DrivePercent := DriveFree / DriveCapacity * 100
;关闭 TrayTip 提示
TrayTip
;change: 临时修改,避免插入U盘后无法取消自动弹出,导致新用户迷惑,以后会有更好的解决方案
Msgbox, 65, %DriveLabel%(%A_LoopField%:) 已插入, 可用空间: %DrivePercent%`% (%DriveFree% MB / %DriveCapacity% MB)`n`n即将开始文件分发,完成后自动弹出。`n要马上开始,请按确定。`n要取消分发,请按取消。, 2
;TrayTip, %A_LoopField%: [%DriveLabel%] 已插入, 可用空间: %DrivePercent%`% (%DriveFree% MB / %DriveCapacity% MB)`n`n即将开始文件分发。
;Sleep, 2000
IfMsgbox, Cancel
{
}
Else
{
Run, orzFilePosterCopier.exe orzFilePoster.lst %A_LoopField%
}
}
}
}
ListOld := ListNew
}
Else If StrLen(ListOld) > StrLen(ListNew)
{
ListOld := ListNew
}
}
Return
orzTechAbout:
orzTechAbout(FileListGUIID)
Return
#IfWinActive, ahk_group FLGuiHotkey
Delete::
GuiControl, Focus, FileList
Gosub FileListRemove
return
^A::
GuiControl, Focus, FileList
LV_Modify(0, "Select")
return