Jules_F Posted October 4, 2019 Posted October 4, 2019 Hello everyone, 😄 I need to make a script that check if a device (my phone only) is connected to my computer with bluetooth. If there is no connection to start a function or program. (it's will behave like a safety feature, to detect that it's me behind the computer) I am on win 10. Thank you.😘 Jules Spoiler $connectionTest=0 ;"0=no connection, 1= my phone is connected by BT to the computer" While 1 If $connectionTest <> 0 then sleep(100) else function_A() EndIF Wend
Moderators JLogan3o13 Posted October 4, 2019 Moderators Posted October 4, 2019 @Jules_F Welcome to the forum. This forum is dedicated to assisting others in improving their scripts; we do not do it for you. If you check the forum, you will find a number of threads around Bluetooth, either detecting or activating a device. Below are just a few examples. Read through these, and any others you find though the forum search feature, and try some things out on your own. If, after trying it on your own, you are stuck, please post your code and we will do our best to assist. Bluetooth UDF "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Nine Posted October 4, 2019 Posted October 4, 2019 I believe you could also use WMI Win32_PnPEntity. Caption field should tell you if it's BlueTooth device and ConfigManagerErrorCode should tell you if it connected and running... https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-pnpentity “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now