Sign in to follow this  
Followers 0
basel1998

check if bloutooth mac Address in range

12 posts in this topic

how to check if bloutooth mac Address in range?

Share this post


Link to post
Share on other sites



Welcome to AutoIt and the forum!

What have you tried so far? Can you post the code?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#RequireAdmin
#NoTrayIcon
if $CmdLine[1] = "/wait" then
$wait = $CmdLine[1+1]
elseif $CmdLine[1+1+1] = "/mac" then
$mac = $CmdLine[1+1+1+1]
elseif $CmdLine[1+1+1+1+1] = "/log" then
$log = $CmdLine[1+1+1+1+1+1]
endif
if $mac then
sleep $wait
else
msgbox(0+64,"Information","Windows will lock after "&$wait,$wait-1)
Run(@WindowsDir & "\system32\rundll32.exe user32.dll, LockWorkStation", "", @SW_HIDE)
if $log = "1" then
Local $file = FileOpen("log.txt", 1)
FileWrite($file, "Windows locked at "&@SEC&":"&@MIN&":"&@HOUR&" "&@MDAY&"/"&@MON&"/"&@YEAR)
FileWrite($file, @CRLF)
FileClose($file)
endif
endif

Share this post


Link to post
Share on other sites

i also tried

#RequireAdmin

#NoTrayIcon

if $CmdLine[1] = "/wait" then

Const $wait = $CmdLine[1+1]

elseif $CmdLine[1+1+1] = "/mac" then

Const $mac = $CmdLine[1+1+1+1]

elseif $CmdLine[1+1+1+1+1] = "/log" then

Const $log = $CmdLine[1+1+1+1+1+1]

endif

if $mac then

sleep $wait

else

msgbox(0+64,"Information","Windows will lock after "&$wait,$wait-1)

Run(@WindowsDir & "\system32\rundll32.exe user32.dll, LockWorkStation", "", @SW_HIDE)

if $log = "1" then

Local $file = FileOpen("log.txt", 1)

FileWrite($file, "Windows locked at "&@SEC&":"&@MIN&":"&@HOUR&" "&@MDAY&"/"&@MON&"/"&@YEAR)

FileWrite($file, @CRLF)

FileClose($file)

endif

endif

Share this post


Link to post
Share on other sites

What does the script you posted have to do with Bluetooth?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

lock pc if bt device is not in range

Edited by baselsayeh

Share this post


Link to post
Share on other sites

Have you tried anything to determine the MAC of the bluetooth adapter?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Have you tried anything to determine the MAC of the bluetooth adapter?

How to do this?

Share this post


Link to post
Share on other sites

Haven't done it myself before but you can try WMI.

Search the Example Scripts fourm for Scriptomatic and try WMI Class "Win32_NetworkAdapter" or something similar.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I made a tool to find bluetooth devices in range. See my signature for more info.


----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

thanks MKISH

Have you tried anything to determine the MAC of the bluetooth adapter?

now yes

but i tried searching bt devices in MKISH tool

its always found!!!

i want somtheng to try to Authenticate to my bt device (mobile)

i found one in http://msdn.microsoft.com/en-us/library/windows/desktop/aa362770%28v=vs.85%29.aspx

but how to use it?

Edited by baselsayeh

Share this post


Link to post
Share on other sites

Then perhaps ur device has been added as a remembered device and thats why it is always found. Remove it from this list and it will work fine.


----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0