• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OT: Favourite features missing from Leopard [was: Applescript and Bluetooth]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: Favourite features missing from Leopard [was: Applescript and Bluetooth]


  • Subject: Re: OT: Favourite features missing from Leopard [was: Applescript and Bluetooth]
  • From: Martin Orpen <email@hidden>
  • Date: Fri, 9 Nov 2007 21:55:45 +0000

On 9 Nov 2007, at 20:28, Peter Baxter wrote:

I noticed that I could do nothing with Bluetooth in Address Book.

Well, a true AppleScripter never lets a minor problem -- like the bluetooth capability being removed from the application -- stand in the way of UI hack:




--UI Script to get bluetooth device names/types
activate application "Bluetooth File Exchange"
tell application "System Events"
tell process "Bluetooth File Exchange"
delay 2
-- close default choose dialog
if exists window "Select File to Send" then
click button "Cancel" of window "Select File to Send"
end if
-- open Browse Device window
keystroke "o" using {command down, shift down}
-- wait for devices to be found
delay 10
set myFlag to false
repeat until myFlag is true
set foundText to value of static text 4 of window "Browse Files"
if foundText contains "Found" then
set myFlag to true
else
delay 2
end if
end repeat
-- grab device names
set n to count value of attribute "AXRows" of table 1 of scroll area 1 of window "Browse Files"
if n is 0 then
set theList to "No bluetooth devices found"
else
set theList to {}
set foo to table 1 of scroll area 1 of window "Browse Files"
repeat with x from 1 to n
set theName to value of text field 1 of row x of foo
set theType to value of text field 2 of row x of foo
set end of theList to theName & tab & theType & return
end repeat
end if
end tell
end tell


theList as string





Regards

--
Martin Orpen
Idea Digital Imaging Ltd


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: OT: Favourite features missing from Leopard [was: Applescript and Bluetooth]
      • From: Peter Baxter <email@hidden>
References: 
 >Applescript and Bluetooth (From: Peter Baxter <email@hidden>)
 >Re: Applescript and Bluetooth (From: Martin Orpen <email@hidden>)
 >OT: Favourite features missing from Leopard [was: Applescript and Bluetooth] (From: Martin Orpen <email@hidden>)
 >Re: OT: Favourite features missing from Leopard [was: Applescript and Bluetooth] (From: Peter Baxter <email@hidden>)

  • Prev by Date: Re: Eject in Leopard (Jay Louvion)
  • Next by Date: Re: Eject in Leopard (Jay Louvion)
  • Previous by thread: Re: OT: Favourite features missing from Leopard [was: Applescript and Bluetooth]
  • Next by thread: Re: OT: Favourite features missing from Leopard [was: Applescript and Bluetooth]
  • Index(es):
    • Date
    • Thread