Hey, I want to get Applescript launch iTunes to launch if an phone is detected connected in bluetooth. Heres the applescript for detection of the phone:
BTdevice_connected("iPhone")
on BTdevice_connected(theDevice)
try
set theData to do shell script "system_profiler SPBluetoothDataType"
set {TID, text item delimiters} to {text item delimiters, theDevice}
set theData to text item 3 of theData
set text item delimiters to "Connected: "
set theData to word 1 of text item 2 of theData
set text item delimiters to TID
return theData is "Yes"
on error
return false
end try
end BTdevice_connected
I also (sperate script ) want to get bluetooth to scan for a phone every 5 seconds (looping)
Thanks as always