AppleScript's shortcomings [was Re: Getting the time zone]
AppleScript's shortcomings [was Re: Getting the time zone]
- Subject: AppleScript's shortcomings [was Re: Getting the time zone]
- From: Martin Orpen <email@hidden>
- Date: Fri, 14 Dec 2007 09:49:54 +0000
On 14 Dec 2007, at 01:09, Rob Lewis wrote:
How can you get the computer's time zone setting in a script?
Also, I've seen a date/time format in XMP metadata like this:
2007-12-14T17:55:38-08:00
Where the letter "T" seems to separate the date from the time, and
the time zone offset is tacked onto the end.
Is this a standard format? Is it directly supported in AppleScript?
Shell script?
Dunno about the "T" but the format is standard outside of AppleScript:
tell application "Automator"
set foo to call method "date" of class "NSDate"
set bar to call method "description" of foo
end tell
--> 2007-12-14 09:44:40 +0000
Which reminds me that I haven't ranted about AppleScript shortcomings
yet :-)
I read the new AppleScript page on the Apple site with great interest
when I saw that Leopard would have an "AppleScript Bridge". About
bloody time I thought to myself. I'm fed up with calling on Automator
when I should be able to make obj-c calls within vanilla AppleScript.
But no, the AppleScript Bridge is for one way traffic and I've still
got to use Autolamer.
If any of the Chris's are listening I really think that AppleScript
should be able to able to utilise obj-c calls and methods out of the
box. It'd take no time to implement and give us _real_ scripters a few
more opportunities for some cunning hacks ;-)
You provided it for Autolamer, AppleScript's idiot offspring, but
didn't upgrade the parent. And why did Autolamer get this feature?
Because you needed to extend an AppleScript-like application to deal
with applications that had no scripting capabilities - like Preview etc.
My version of Script Editor for Leopard would have been something
along the lines of Script Debugger's Explorer but, instead of just
AppleScript, we get to see all the obj-c classes and methods so that
we can grab whatever we want from an application or the OS without
having to rely on the developer incorporating AppleScript first.
No AppleScript dictionary? No problem!
BTW, I once contemplated giving up AppleScript in favour of a proper
programming language. Joining the Developer Program put me off though.
The "large" T shirt that was supplied with the joining pack was for
somebody who weighed at least 300lbs - I don't have the time to sit in
front of a screen eating that much pizza... I just want to script and
then go and do something more interesting.
--
Martin Orpen
Idea Digital Imaging Ltd
_______________________________________________
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