Jump to content

Recommended Posts

Posted

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
Posted

@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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...