Hotkey call tripartite program-practical method
1. Description of the problem or requirement:
Hotkey call tripartite program
two。 Solution:
Using the AutoIt3 scripting language, you can quickly write a hotkey keynote program.
3. For example:
Use hotkeys to call three-party programs to achieve specific needs. In the routine, we can adjust the tripartite program when pressing the "F4" key to clear all Bluetooth connections on the computer.
Au3 Code:
If WinExists ("firswof-clearbt") Then ExitGUICreate ("firswof-clearbt") HotKeySet ("{ESC}", "_ Exit") HotKeySet ("{F2}", "_ ShutAllConsole") HotKeySet ("{F3}", "_ RestartBT") HotKeySet ("{F4}", "_ ClearBT") ToolTip ("[ESC: exit") F4: clear Bluetooth] ", 0,0) While (1) Sleep (60000) WEndFunc _ Exit () ExitEndFuncFunc _ ClearBT () ShellExecute (" E:\ BT_Pair.exe ","-u ",") EndFuncFunc _ RestartBT () ShellExecute ("E:\ BT_Pair.exe", "- r", ") EndFuncFunc _ ShutAllConsole () ShellExecute (" E:\ BT_Pair.exe ","-a ",") EndFunc