-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPathGUI.au3
49 lines (41 loc) · 953 Bytes
/
PathGUI.au3
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
#Region Configuración
#pragma compile(Icon, Icons\au3.ico)
#pragma compile(Out, PathGUI.exe)
#NoTrayIcon
Opt('ExpandEnvStrings', 1)
Opt('GUIOnEventMode', 1)
#EndRegion
#Region Variables globales
Global $lista
#EndRegion
#Region Manejadores de eventos
Func _GUI_EVENT_CLOSE()
GUIDelete()
Exit
EndFunc
Func _listaClicked()
Local Const $ruta = GUICtrlRead($lista)
ClipPut($ruta)
Run('explorer.exe /n,/e,' & $ruta)
EndFunc
#EndRegion
#Region Funciones
Func _ArmarLista()
For $ruta In StringSplit(EnvGet('Path'), ';', 2)
GUICtrlSetData($lista, $ruta)
ConsoleWrite($ruta & @LF)
Next
EndFunc
#EndRegion
#Region Interfaz gráfica
GUICreate('Path', 500, 500)
GUISetFont(10, Default, Default, 'Liberation Mono')
$lista = GUICtrlCreateList('', 5, 5, 490, 490)
_ArmarLista()
GUICtrlSetOnEvent($lista, _listaClicked)
GUISetOnEvent(-3, _GUI_EVENT_CLOSE)
GUISetState(@SW_SHOW)
While 1
Sleep(100)
WEnd
#EndRegion