stormbreaker Posted April 14, 2012 Posted April 14, 2012 (edited) Hello everybody, this is my first example script weeks after giving my exams. Here is it:#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Bluetooth Manager (just something)", 409, 135, 192, 124) $Label1 = GUICtrlCreateLabel("This script will check if your PC is bluetooth enabled.", 8, 8, 368, 17) $Button1 = GUICtrlCreateButton("Check if device present", 112, 48, 171, 25, $WS_GROUP) $Checkbox1 = GUICtrlCreateCheckbox("Disable Discovery for all Bluetooth Devices on PC", 16, 96, 257, 17) $Button2 = GUICtrlCreateButton("Exit", 312, 96, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $RESULT = DllCall("bthprops.cpl", "Bool", "BluetoothEnableIncomingConnections", "Handle", 0, "Bool", 1) If $RESULT[0] = 1 then msgbox(64, "Message", "Congrats! Your Computer is bluetooth enabled.") else msgbox(16, "", "No device found") EndIf Case $Checkbox1 If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) Then $RESULT = DllCall("bthprops.cpl", "Bool", "BluetoothEnableDiscovery", "Handle", 0, "Bool", 0) msgbox(64, "", "Discovery Disabled.") Else $RESULT = DllCall("bthprops.cpl", "Bool", "BluetoothEnableDiscovery", "Handle", 0, "Bool", 1) msgbox(64, "", "Discovery Enabled.") EndIf Case $Button2 Exit EndSwitch WEndIt can check if your PC is bluetooth enabled and can switch between bluetooth discovery modes. All functions taken from Microsoft's bthprops.cpl Constructive suggestions are always welcomeEnjoy.Note: Bluetooth discoverability can be controlled as long as the script is running. Once terminated, bluetooth state changes back to previously set by user. This is a Microsoft bluetooth function issue.EDIT: This script is only meant for discovering Bluetooth Radios on a PC. That's all. Edited October 7, 2012 by MKISH funkey and Qwerty212 2 ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1
Lyoko Posted April 15, 2012 Posted April 15, 2012 You can write out the UDF can send files to your mobile phone?
stormbreaker Posted April 16, 2012 Author Posted April 16, 2012 Sorry, but I have not studied the functions thoroughly. Furthermore, I only used the discovery functions to control bluetooth devices on my friend's cyber cafe. You can take a look at: http://msdn.microsoft.com/en-us/library/windows/desktop/aa362927(v=vs.85).aspx.Happy coding with autoit. ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1
PhoenixXL Posted May 14, 2012 Posted May 14, 2012 (edited) Well sorry for Interuption MKISH But Your Script Didn't Work I'm Having BlueSoleil Windows 7 32 Bit 2GB Ram and Core 2 Duo Processor Buld 7600 If Possible can U tell what iz the Problem in my Computer I actually didnt have a integrated Bluetooth I'm Having a Bluetooth Dongle and It works Thnx For any Possible Help Regards Phoenix XL Edited October 5, 2012 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
stormbreaker Posted May 20, 2012 Author Posted May 20, 2012 This one uses the functions from bthprops.cpl. Maybe they are only applicable on specific devices. Further, I believe that Blue-Soleil has its own API (or so)... ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1
PhoenixXL Posted May 20, 2012 Posted May 20, 2012 (edited) I dont have Any Knowledge. Anyways Keep Up the Good Work.. Edited October 5, 2012 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
sersam Posted October 4, 2012 Posted October 4, 2012 How to send (Transfer pc to phone) file with it ?
stormbreaker Posted October 7, 2012 Author Posted October 7, 2012 Take a look carefully at the topic, I just made it to detect BTH devices. You would need windows sockets for this purpose. Lookup on MSDN, they have plenty of samples. Regardless, I suggest you try my Bluetooth Finder Tool in place of this script (its much better). ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1
asanapaX Posted December 26, 2016 Posted December 26, 2016 Hi all, I am trying to automate bluetooth pairing in windows 8 by following steps Click on Start->bluetooth settinggs-> scan the devices-> here i would like to read device name. How can i ensure it is clicking on correct device(whatever i am expecting). Can any one help get the name of bluetooth scanned
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