Я использовал AutoHotKey:
; Auto-click jit debug pop-up. Run the script as admin.
Loop,
{
WinWait, Visual Studio Just-In-Time Debugger
IfWinExist, Visual Studio Just-In-Time Debugger
{
;MsgBox, here
WinActivate, Visual Studio Just-In-Time Debugger
; click the yes button
SetControlDelay -1
ControlClick, Button1
; choose instance from the list
WinWait, Choose Just-In-Time Debugger
WinActivate, Choose Just-In-Time Debugger
;ControlGet, lb1, Hwnd, , ListBox1
;msgbox, %lb1%
ControlGet, items, List, , ListBox1
Loop, Parse, items, `n
{
;MsgBox, Item number %A_Index% is %A_LoopField%.
IfInString, A_LoopField, administrator
{
;MsgBox, found
Control, ChooseString, %A_LoopField%, ListBox1
break
}
}
}
}
В списке я ищу элемент, содержащий подстроку «администратор», но вы можете изменить это.