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:

  Reveal hidden contents

 

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:

  Reveal hidden contents

 

Posted

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

My UDFs and Tutorials:

  Reveal hidden contents

 

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:

  Reveal hidden contents

 

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 (edited)

thanks MKISH

  On 9/7/2012 at 9:41 PM, 'water said:

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