• 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
Sending files to phone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sending files to phone


  • Subject: Sending files to phone
  • From: Ronan O Ciosoig <email@hidden>
  • Date: Wed, 02 Dec 2009 01:18:31 +0100

Hi all, 

I have this script to send music files from iTunes to a mobile phone over bluetooth, but it only works for 1 file. Can anyone advise on how to fix it, so that it works for a selected list? Thanks.


-- found initial script on
-- http://macscripter.net/viewtopic.php?id=28296

-- needed to activate System Preferences -> Universal Access
-- Enable Access for assistive devices

-- didn't work the first time, but works after that. 
-- name of mobile phone
property device : "Nokia N81"

tell application "iTunes"
if selection is not {} then
set sel to selection
repeat with aTrack in sel
set fileToSend to aTrack's location
tell application "Finder" to open fileToSend using application file id "com.apple.BluetoothFileExchange"
activate application "Bluetooth File Exchange"
tell application "System Events"
tell process "Bluetooth File Exchange"
repeat until exists window 1
delay 0.5
end repeat
select (1st row of table of scroll area "Bluetooth Devices" of window 1 whose value of text field 1 is device)
click button "Send" of window 1
end tell
end tell


end repeat


else
display dialog "No track selected"
end if


end tell

 _______________________________________________
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

  • Prev by Date: Re: question about creating alias from UTF8 path name
  • Next by Date: Snow Leopard osax security and 'run script' with parameters
  • Previous by thread: Re: question about creating alias from UTF8 path name
  • Next by thread: Snow Leopard osax security and 'run script' with parameters
  • Index(es):
    • Date
    • Thread