Starting with OS X Yosemite, you can use JavaScript for writing Mac apps and scripts.
<a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;library&#x2F;mac&#x2F;releasenotes&#x2F;InterapplicationCommunication&#x2F;RN-JavaScriptForAutomation&#x2F;Articles&#x2F;Introduction.html" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;library&#x2F;mac&#x2F;releasenotes&#x2F;Interap...</a>