Jump to content

check if bloutooth mac Address in range


 Share

Recommended Posts

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

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