Hi,
I'm totally totally new at this.
Is it possible to record a sound and let it play when a motion is detected using Applescript? I would like to let iTunes play a barking dog sound
Joris
Joris wrote:Is it possible to record a sound and let it play when a motion is detected using Applescript? I would like to let iTunes play a barking dog sound
--[url=applescript://com.apple.scripteditor/?action=new&script=on%20PlayTune(myTrack)%0A%09tell%20application%20%22iTunes%22%0A%09%09set%20myTrackList%20to%20(get%20every%20track%20of%20playlist%201%20where%20name%20is%20myTrack)%0A%09%09play%20(get%20first%20item%20of%20myTrackList)%0A%09end%20tell%0Aend%20PlayTune]Click here to open this script in a new Script Editor window[/url].
on PlayTune(myTrack)
tell application "iTunes"
set myTrackList to (get every track of playlist 1 where name is myTrack)
play (get first item of myTrackList)
end tell
end PlayTune
gregjsmith wrote:Here's an attachment.
PlayTune("Your Song Name")
egrass wrote:I took the script you suggested and modified it as follows in the AppleScript editor to match a sound file in my iTunes
PlayTune("doorbell-1")
(I get an error when I try to play this from the editor. I am running OS10.3)
Users browsing this forum: No registered users and 3 guests