News for hackers. Stuff that matters.
Re:JavaScript as an alternative to AppleScript on OS X Yosemite by zyxley on Saturday June 07, 2014 @04:35PM (#7863017)
This makes me really happy.

I kind've wish they'd used $ for what Application() is, though, to keep an analogous similarity with jQuery and the like.

Re:JavaScript as an alternative to AppleScript on OS X Yosemite by jonknee on Saturday June 07, 2014 @04:43PM (#7863037)
That's easy to do on your own though:

   var $ = Application;
Re:JavaScript as an alternative to AppleScript on OS X Yosemite by jiggy2011 on Saturday June 07, 2014 @04:41PM (#7863032)
$ = Application;

Easy fix!

Re:JavaScript as an alternative to AppleScript on OS X Yosemite by angilly on Saturday June 07, 2014 @04:46PM (#7863043)
Not if you want to use the Obj-C bridge, though :)

"The primary access points for the Objective-C bridge are the global properties ObjC and $."

Re:JavaScript as an alternative to AppleScript on OS X Yosemite by Touche on Saturday June 07, 2014 @04:53PM (#7863068)
Bridge = $;

$ = Application;

Re:JavaScript as an alternative to AppleScript on OS X Yosemite by nkozyra on Saturday June 07, 2014 @04:43PM (#7863036)
You've successfully hacked Javascript!
Re:JavaScript as an alternative to AppleScript on OS X Yosemite by hackmiester on Saturday June 07, 2014 @04:55PM (#7863078)
Could there be any reasonable situation where one might want to load jQuery within this environment, though?

(Although, I suppose, you could use another var for jQuery, such as, uh, 'jQuery' ...)

Re:JavaScript as an alternative to AppleScript on OS X Yosemite by pygy_ on Saturday June 07, 2014 @06:30PM (#7863317)
jQuery is a DOM manipulation library, it is not useful to script OS X apps.

...unless one of them exposes a HTML DOM to the scripting layer, now that I think of it.

Re:JavaScript as an alternative to AppleScript on OS X Yosemite by duskwuff on Saturday June 07, 2014 @07:00PM (#7863379)
Scripting a web browser, perhaps? :)

    tell document to write "hello world"