熱鍵調用三方程序 --- 實用方法

1. 問題或需求描述:
熱鍵調用三方程序ide

2.解決方法:
使用 AutoIt3 腳本語言,能夠快速編寫出熱鍵主調程序。code

3.例如:
利用熱鍵調用三方程序,實現特定須要。例程中,咱們實現按 「F4」鍵時調起三方程序,實現清除電腦上的全部藍牙鏈接等功能。ip

au3代碼:it

If WinExists("firswof-clearbt") Then Exit
GUICreate("firswof-clearbt")
HotKeySet ( "{ESC}" , "_Exit")
HotKeySet ( "{F2}" , "_ShutAllConsole")
HotKeySet ( "{F3}" , "_RestartBT")
HotKeySet ( "{F4}" , "_ClearBT")
ToolTip("[ESC:退出;F4:清除藍牙]", 0, 0)

While (1)
   Sleep(60000)
WEnd

Func _Exit()
   Exit
EndFunc

Func _ClearBT()
   ShellExecute ( "E:\BT_Pair.exe" , " -u" , "")
EndFunc

Func _RestartBT()
    ShellExecute ( "E:\BT_Pair.exe" , " -r" , "")
EndFunc

Func _ShutAllConsole()
    ShellExecute ( "E:\BT_Pair.exe" , " -a" , "")
EndFunc
相關文章
相關標籤/搜索