a date is not a date? Or: Why I sometimes hate AppleScript...
a date is not a date? Or: Why I sometimes hate AppleScript...
- Subject: a date is not a date? Or: Why I sometimes hate AppleScript...
- From: Skeeve <email@hidden>
- Date: Sat, 09 Feb 2008 14:57:20 +0100
I needed almost half an hour before I found a working solution but still
don't know:
a) Why I need this construct
b) How one should have known
I tried this:
set x to current date
display dialog class of x
display dialog year of x
tell application "iTunes"
set these_tracks to selection of front browser window
set these_tracks_ref to a reference to these_tracks
repeat with tr in these_tracks_ref
set y to date added of tr
display dialog class of y
display dialog year of y
end repeat
end tell
"year of x" works
"year of y" fails
I really needed almost half an hour to find that this works:
set x to current date
display dialog class of x
display dialog year of x
tell application "iTunes"
set these_tracks to selection of front browser window
set these_tracks_ref to a reference to these_tracks
repeat with tr in these_tracks_ref
set y to date added of tr
tell application "System Events"
display dialog class of y
display dialog year of y
end tell
end repeat
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