我将列出快速启用或禁用网络适配器所需的手动步骤。然后,我将把这些步骤转换成AutoHotkey。
用手:
从命令行打开“ 网络连接 ”。
explorer ::{7007ACC7-3202-11D1-AAD2-00805FC1270E}

激活窗口后,按 Space将焦点设置到适配器列表。

如果你想使适配器/禁用当前选择(即1st`名单上),请跳到第5步。
如果未选择适配器,请按 Right直到选择它。例如按Right 1周时间如果适配器是第二列表中,2倍,如果它是第三等

右键单击适配器,然后按 Down以突出显示Enable
或Disable
选项。


按 Enter到Enable
或Disable
。
关闭网络连接。
自动热键:
使用键盘快捷键Ctrl+,
^,::
;1.
Run, explorer ::{7007ACC7-3202-11D1-AAD2-00805FC1270E}
;2.
WinWaitActive, Network Connections
Send, {Space}
;3. & 4.
;If the adapter is not the 1st, navigate to it.
;For example, without the comment (semi-colon):
; Send, {Right 1}
;if it is the 2nd adapter.
; Send, {Right 2}
;if it is the 3rd, etc.
;5.
Send, {AppsKey}
Sleep, 250 ;adjust as needed
Send, {Down}
;6.
Send, {Enter}
;7.
WinClose, Network Connections
return
[Alt]
每次按时发送[Ctrl]
,除非您以这种方式编写。