68
68
( LTrim RTrim0 Join
69
69
Startup parameters:
70
70
`n`n
71
-
71
+
72
72
- notify
73
73
`n
74
74
Start with "" Notify on focus "" enabled by default.
80
80
`n
81
81
Start with "" Notify always"" enabled by default.
82
82
`n
83
- Same as above, but also display notification if the UAC window
83
+ Same as above, but also display notification if the UAC window
84
84
pops up already focused by the OS.
85
85
`n`n
86
86
147
147
148
148
; Tray menu
149
149
Menu , Tray , Click , 2
150
- Menu , Tray , NoStandard ; Standard/NoStandard = debugging / normal
151
- Menu , Tray , Add , & Debug, debug_window
150
+ Menu , Tray , NoStandard
151
+
152
+ ; Enable for debug menu
153
+ ; Menu, Tray, Add, &Debug, debug
154
+ ; Menu, Tray, Add
155
+
152
156
Menu , Tray , Add , & About, about_box
153
157
Menu , Tray , Default , & About
158
+ ; Menu, Tray, Default, &Debug
154
159
155
160
; Letter «i» in blue circle icon
156
161
Menu , Tray , Icon , & About, %A_Windir %\system32\SHELL32.dll, 278
163
168
Menu , OptionID, Add
164
169
Menu , OptionID, Add , Beep on focus , notify_toggle
165
170
Menu , Tray , Add , & Notify, :OptionID
166
-
171
+
167
172
; White balloon tip with «i» icon
168
173
; Menu, Tray, Icon, &Notify, %A_Windir%\system32\SHELL32.dll, 222
169
174
177
182
178
183
Menu , Tray , Add
179
184
Menu , Tray , Add , & Open file location, open_Location
180
-
185
+
181
186
; Document with loupe icon
182
187
Menu , Tray , Icon , & Open file location, %A_Windir %\system32\SHELL32.dll, 56
183
188
Menu , Tray , Add , & Help, help_box
184
-
189
+
185
190
; «?» mark in blue circle icon
186
191
Menu , Tray , Icon , & Help, %A_Windir %\system32\SHELL32.dll, 24
187
192
Menu , Tray , Add
@@ -209,9 +214,13 @@ OnMessage( MsgNum, "ShellMessage" )
209
214
210
215
if (InStr (class, " Credential Dialog Xaml Host" ) and InStr (process , " consent.exe" ))
211
216
{
212
- ; Temporarily change to 'if not' for easier debugging
213
217
if WinActive (ahk_id lParam)
214
218
{
219
+ loop , 4
220
+ {
221
+ sleep 75
222
+ PostMessage , WM_SYSCOMMAND := 0x0112 , SC_HOTKEY := 0xF150 , %lParam%,,
223
+ }
215
224
216
225
if (beep = " All" )
217
226
SoundBeep , , 100
@@ -221,28 +230,32 @@ OnMessage( MsgNum, "ShellMessage" )
221
230
}
222
231
else
223
232
{
224
- WinActivate (ahk_id lParam)
233
+ loop , 4
234
+ {
235
+ sleep 75
236
+ PostMessage , WM_SYSCOMMAND := 0x0112 , SC_HOTKEY := 0xF150 , %lParam%,,
237
+ }
238
+
225
239
Gosub activation_followup
226
240
}
227
-
228
- ; If enabled, stops working with multiple windows:
229
- ; WinWaitClose, ahk_id %lParam%
230
241
}
231
242
}
232
243
}
233
244
234
245
235
246
; ================================================================================================
236
247
; Functions & subroutines
237
- exit ()
248
+ ; Esc::Reload
249
+
250
+ debug()
238
251
{
239
- ExitApp
252
+ ListVars
253
+ Pause On
240
254
}
241
255
242
- debug_window ()
256
+ exit ()
243
257
{
244
- ListVars
245
- pause , on
258
+ ExitApp
246
259
}
247
260
248
261
open_Location()
@@ -263,22 +276,22 @@ OnMessage( MsgNum, "ShellMessage" )
263
276
if FileExist (tray_icon)
264
277
Menu , Tray , Icon , %tray_icon%
265
278
return
266
-
267
-
279
+
280
+
268
281
; Subroutine
269
282
/*
270
283
Additional icons to consider:
271
-
284
+
272
285
Green shield with checkmark icon
273
286
Menu, Tray, Icon, %A_Windir%\system32\imageres.dll, 102
274
-
287
+
275
288
Blue circled arrows icon
276
289
Menu, Tray, Icon, %A_Windir%\System32\shell32.dll, 239
277
-
290
+
278
291
Green checkmark icon
279
292
Menu, Tray, Icon, %A_Windir%\System32\shell32.dll, 297
280
293
*/
281
-
294
+
282
295
do_flash_tray_icon :
283
296
SetTimer , do_flash_tray_icon, Off
284
297
Menu , Tray , Icon , %tray_icon_flashed% ; Use embedded icon data
@@ -499,16 +512,16 @@ icon_green(NewHandle := False)
499
512
500
513
If
501
514
( RTrim0 Join
502
- ! DllCall (" Crypt32.dll\CryptStringToBinary" , " Ptr" , & B64, " UInt" ,
515
+ ! DllCall (" Crypt32.dll\CryptStringToBinary" , " Ptr" , & B64, " UInt" ,
503
516
0 , " UInt" , 0x01 , " Ptr" , 0 , " UIntP" , DecLen, " Ptr" , 0 , " Ptr" , 0 )
504
517
)
505
518
Return False
506
-
519
+
507
520
VarSetCapacity (Dec, DecLen, 0 )
508
521
509
522
If
510
523
( RTrim0 Join
511
- ! DllCall (" Crypt32.dll\CryptStringToBinary" , " Ptr" , & B64, " UInt" ,
524
+ ! DllCall (" Crypt32.dll\CryptStringToBinary" , " Ptr" , & B64, " UInt" ,
512
525
0 , " UInt" , 0x01 , " Ptr" , & Dec, " UIntP" , DecLen, " Ptr" , 0 , " Ptr" , 0 )
513
526
)
514
527
Return False
@@ -517,7 +530,7 @@ icon_green(NewHandle := False)
517
530
; (JPEG/PNG/GIF) to hBITMAP?" by SKAN
518
531
; -> http://www.autohotkey.com/board/topic/21213-how-to-convert-image-
519
532
; data-jpegpnggif-to-hbitmap/?p=139257
520
-
533
+
521
534
hData := DllCall (" Kernel32.dll\GlobalAlloc" , " UInt" , 2 , " UPtr" , DecLen, " UPtr" )
522
535
pData := DllCall (" Kernel32.dll\GlobalLock" , " Ptr" , hData, " UPtr" )
523
536
DllCall (" Kernel32.dll\RtlMoveMemory" , " Ptr" , pData, " Ptr" , & Dec, " UPtr" , DecLen)
0 commit comments