• 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: Passing dropped items to shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing dropped items to shell script


  • Subject: Re: Passing dropped items to shell script
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 15 May 2009 10:37:37 -0500

I know I had an example of calling an internal command, but where was it? ... Found It! ...

on startTheMusic()
try
tell application "Finder"
set selfRef to (path to me) as alias
set pluginsFolder to (folder "Plug-ins" of folder "Contents" of selfRef) as alias
if not (exists some alias file of pluginsFolder) then return 0 -- there's no music to play
--
-- set volLevel to ...
--
(original item of some alias file of pluginsFolder) as alias -- pick a random music file
set musicPath to quoted form of (POSIX path of the result)
set comdPath to quoted form of (POSIX path of selfRef & "/Contents/ Resources/bin/qtplay")
end tell
do shell script comdPath & " -l " & volLevel & musicPath & " &> /dev/ null & echo $!"
return the result
on error
return 0
end try
end startTheMusic



_______________________________________________ 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
References: 
 >Passing dropped items to shell script (From: Marconi <email@hidden>)

  • Prev by Date: Re: Passing dropped items to shell script
  • Next by Date: Inserting image in MSWord Document
  • Previous by thread: Inserting image in MSWord Document
  • Next by thread: Re: Passing dropped items to shell script
  • Index(es):
    • Date
    • Thread