This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.
| « | June 2005 | » | ||||
|---|---|---|---|---|---|---|
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | ||
24 hours of Google Reader Shared Items
links for October 2, 2008
NuevaSync
Virtual Machines
Moving to Windows
Vista on Mac mini
Insecure wifi
links for September 7, 2008
links for September 6, 2008
Squeezebox Boom
Since the code that I wanted to write to determine if a track has been added to iTunes was not working, this is the code that I have found that works the best. It seems that the only way to determine if a track is already added to iTunes is to add it, and then if iTunes throws an exception, then the track was already added.
tell application "iTunes"
with timeout of 300 seconds
-- The easiest way to figure out if this track is already in the library is to
-- add it. If the number of tracks increases, then the track was not in there
--
-- Ideally this would be able to call something like:
-- (exists (get some track of library playlist 1 whose location is theFile))
set this_track to {}
set fAddedFile to false
set gotException to false
try
set initialCount to get count of every file track of library playlist 1
set this_track to (add theFile)
set countAfter to get count of every file track of library playlist 1
if countAfter > initialCount then
set fAddedFile to true
end if
on error
-- This is where we catch the error if the track has already been added to the library:
end try
end timeout
end tell
It is pretty bad that iTune's AppleScript dictionary is not better.
Technorati Tags: AppleScript
This
work is licensed under a
Creative Commons License.
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
January 2004
Computer [765]

Blogging [112]

Links [71]

Cars [64]

Electronics [205]

General [134]

Gadgets [62]

Phone [46]

Family [13]

Games [26]

moblog [4]

Hardware [19]

Third Time Dad
Engadget
Autoblog
Geek News Central
Jessica's Blog
atmaspheric | endeavors
Paint the Tiger • Carve the Swan
TiVoBlog
SuperJason's Personal Blog
Forever Geek
sprocket i/o
Slacy's Blog