JavaScript as an alternative to AppleScript on OS X Yosemite
81–90 of 126 posts
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#82AppleScript contains some amazingly powerful APIs, but is nearly impossible to write. Having a Javascript (successor?) implementation is going to unleash its full potential. I could see it becoming much more widely used and supported by third party apps. This is wonderful. In the same cycle that they release a brand new language, they begin the deprecation process for their (only?) other proprietary programming langu…
AppleScript was originally conceived to be easy enough for non-professional programmers to read and write, with the history of Hypercard behind it. This is for those rare occasions when they needed to automate something that they do with multiple applications manually. At one point, you were able to hit "Record", do the things that you needed to be automated and boom you get a script that you can begin to massage int…
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#83Earlier quoted context omitted.
AppleScript was originally conceived to be easy enough for non-professional programmers to read and write, with the history of Hypercard behind it. This is for those rare occasions when they needed to automate something that they do with multiple applications manually. At one point, you were able to hit "Record", do the things that you needed to be automated and boom you get a script that you can begin to massage int…
That reminds me... the first "web app" I ever built was a home automation interface, hacked together with AppleScripts, because that's all I could figure out how to do on my Mac in high school (circa 2001). I don't remember how the webserver portion of it worked (but I definitely didn't implement it myself)
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#84Earlier quoted context omitted.
AppleScript was originally conceived to be easy enough for non-professional programmers to read and write, with the history of Hypercard behind it. This is for those rare occasions when they needed to automate something that they do with multiple applications manually. At one point, you were able to hit "Record", do the things that you needed to be automated and boom you get a script that you can begin to massage int…
Automator even has the same "record" functionality for repeating tasks in a UI[1]. The direct Automator actions like "scale image" are cleaner when they exist, but including Automator actions with 3rd party applications didn't catch on as much as it could have. Some apps have them (Pixelmator comes to mind), but for the most part it doesn't have the support that AppleScript used to. It's a bit sad that we now have ea…
Actually, even an 'evolution' isn't necessary, since AppleScript can directly work with Objective-C frameworks, instantiating objects, calling methods, etc. So this gluing between the desktop world and the networked world already exists.
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#85If anyone wants to do stuff similar to this on earlier versions of OS X (but arguably even more generally) or on iOS they should look at one of my projects, Cycript, an Objective-C/JavaScript hybrid with a highly-bridged Foundation/JavaScriptCore object model that can inject code into running applications. http://www.cycript.org/ (I expect to have the ability to introspect and manipulate Swift objects in the near fut…
Will Cycript work on 10.10 or are you just saying that you'll have two JS choices now (Cycript and JS Automation)?
I use Substrate all the time, I really need to look into Cycript! =)
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#86That entire thread is around how Javascript is a bad paradigm for desktop. But, this entire thread is how amazing javascript is going to be for OSX.
Let me add that the JS programming model of Gnome is what powers http://extensions.gnome.org - and I have my own extensions in there. Also (and correct me if I'm wrong) the "GObject Introspection" mechanism is fairly analogous to OSA.
So, is there a underlying technical or implementation issue that makes it good on OSX and bad on Gnome ? use case? technology ? OSA ?
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#87If anyone wants to do stuff similar to this on earlier versions of OS X (but arguably even more generally) or on iOS they should look at one of my projects, Cycript, an Objective-C/JavaScript hybrid with a highly-bridged Foundation/JavaScriptCore object model that can inject code into running applications. http://www.cycript.org/ (I expect to have the ability to introspect and manipulate Swift objects in the near fut…
> earlier versions of OS X Will Cycript work on 10.10 or are you just saying that you'll have two JS choices now (Cycript and JS Automation)? I use Substrate all the time, I really need to look into Cycript! =)
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#88Yes, I know that Open Scripting Architecture is also quite old, but having now JavaScript bindings and the types of demos they made, just reminded me of it.
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#89Why aren't there saner alternatives to Javascript in browsers? We have so many languages at our disposal, why choose Javascript? Why don't people realize that web programming is not great because of Javascript but despite Javascript?
We are bound to Javascript on the web because browsers, for whatever reason, don't support anything else. But we don't have to make matters worse by dragging this weirdo language unto the rest of the programming world.
But who am I kidding, AppleScript may be one of the few languages actually worse than Javascript.
Re: JavaScript as an alternative to AppleScript on OS X Yosemite
#90Stupid and uninformed question here: Given Apple's well-known antipathy to the idea of browser engines other than WebKit and scripting languages other than JavaScript on iOS (yes, yes, I know you can find Python/Lua/Lisp/whatever apps on iOS; I mean as a general rule and for inter-app automation), could this be a prelude to allowing some sort of sandboxed-app automation interface on iOS? That is, allow a JavaScript i…
Genuine answer here. There's no need to apologize for not constantly immersing yourself in the workings of Apple platforms. :-) JavaScript is just another interface to Apple's "Open Scripting Architecture (OSA)." Previously, AppleScript was the only way to use it. The fact that they added another language indicates nothing about whether OSA will ever come to iOS. My guess is it won't; the new extensions APIs will lik…