Jump to content

Recommended Posts

Posted

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 2024-07-28 - Version 1.6.3.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 (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

 

Posted

#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

Posted

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

Posted

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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

 

Posted

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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

 

Posted

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 2024-07-28 - Version 1.6.3.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 (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

 

Posted

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

Posted

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

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...