Changeset a9e08a4


Ignore:
Timestamp:
Aug 23, 2009, 11:13:02 PM (15 years ago)
Author:
Evan Broder <broder@…>
Branches:
master, debian, mac, no-cups, web
Children:
bd7b4f8
Parents:
9758b72
git-author:
Evan Broder <broder@…> (08/23/09 20:30:42)
git-committer:
Evan Broder <broder@…> (08/23/09 23:13:02)
Message:

Instead of looping over the lpr commands within applescript, use a
backgrounded shell loop so that iTunes doesn't hang while the jobs are
printing.

(Since I'm not currently on campus, this is as yet untested.)

Location:
gutenbach-itunes-plugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gutenbach-itunes-plugin/INSTALL

    r3fde6d5 ra9e08a4  
    77
    88* Changelog
     923 Aug 2009 -> broder spun loop into shell script instead of
     10    applescript so that iTunes doesn't hang
    9119 Jan 2009 -> price added 'quoted form'
    10127 Jan 2009 -> kmill created initial version
  • gutenbach-itunes-plugin/Send to sipbmp3.applescript

    rd85614b ra9e08a4  
    88-- Changelog:
    99--
     10-- 23 Aug 2009 -> broder spun loop into shell script instead of
     11--     applescript so that iTunes doesn't hang
    1012-- 9 Jan 2009 -> price added 'quoted form'
    1113-- 7 Jan 2009 -> kmill created initial version
     
    3436-- hear around you.
    3537
    36 set lista to {}
     38set ts to ""
    3739
    3840tell application "iTunes"
     
    4042                if class of t is (file track) then
    4143                        set loc to POSIX path of (get location of t)
    42                         set end of lista to "lpr -o raw -Psipbmp3 " & (quoted form of loc)
     44                        set ts to ts & " " & (quoted form of loc)
    4345                end if
    4446        end repeat
    4547end tell
    4648
    47 repeat with com in lista
    48         do shell script com
    49 end repeat
     49set command to "(for t in " & ts & "; do lpr -o raw -Psipbmp3 \"$t\"; done) >/dev/null 2>&1 </dev/null &"
     50do shell script command
Note: See TracChangeset for help on using the changeset viewer.