Bluetooth Enable/Disable Toggle

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
radar81
Posts: 15
Joined: 04 Dec 2017, 07:34

Bluetooth Enable/Disable Toggle

Post by radar81 » 15 Aug 2019, 11:40

Hello,
I'd like to create a script to turn bluetooth on or off without having to go into Windows settings. Is this possible? Thanks
cjsmile999
Posts: 42
Joined: 01 Feb 2017, 09:33

Re: Bluetooth Enable/Disable Toggle

Post by cjsmile999 » 15 Aug 2019, 12:28

I'm attempting to do something simliar via AHK. Essentially it's possible via Powershell, and I'm tyring to wrap powershell inside AHK so I can perform some additional functions. Although I'm currently receiving an error when launching it via AHK. I mention in case it meets your needs. Below is the thread I started.

https://www.autohotkey.com/boards/viewtopic.php?f=76&t=67129
radar81
Posts: 15
Joined: 04 Dec 2017, 07:34

Re: Bluetooth Enable/Disable Toggle

Post by radar81 » 19 Aug 2019, 09:22

Hi @cjsmile999 , I looked at your other thread and you are light years ahead of me on scripting. I wish I could help though. Please let me know if you figure it out.
Dave
cjsmile999
Posts: 42
Joined: 01 Feb 2017, 09:33

Re: Bluetooth Enable/Disable Toggle

Post by cjsmile999 » 20 Aug 2019, 19:13

radar81, I was able to work out my issue. I've updated the script on my post. Feel free to use/modify as needed to meet your needs.
radar81
Posts: 15
Joined: 04 Dec 2017, 07:34

Re: Bluetooth Enable/Disable Toggle

Post by radar81 » 29 Aug 2019, 06:50

Hi @cjsmile999, thanks for the update. I'm going to ask you a question with respect to the content of your code on the other thread.
User avatar
adegard
Posts: 90
Joined: 24 Nov 2017, 05:58
Contact:

Re: Bluetooth Enable/Disable Toggle

Post by adegard » 06 Jun 2020, 08:42

Code: Select all

SendMode Input
Run, ms-settings:bluetooth
WinWaitActive, Settings
Sleep 2000
Send,{Tab}{Space}
WinClose, A
vsub
Posts: 541
Joined: 29 Sep 2015, 03:39

Re: Bluetooth Enable/Disable Toggle

Post by vsub » 06 Jun 2020, 09:34

A shortcut key for something that requires two clicks?

Click on the actions center button next to the clock=>click on the Bluetooth icon and done

https://www.digitalcitizen.life/turn-on-off-bluetooth-windows-10
downloaderfan
Posts: 34
Joined: 09 Jun 2017, 09:19

Re: Bluetooth Enable/Disable Toggle

Post by downloaderfan » 03 Sep 2022, 12:39

Were you able to actually get this working? I tried turning Bluetooth On and Off using this.

Code: Select all

btconfig -c 0

btconfig -c 1

btconfig -d 0

btconfig -d 1
None of these worked in disabling bluetooth
Post Reply

Return to “Ask for Help (v1)”