kfix / MacPin

a webapp container & site specific browser made from WebKit.swift and JavaScriptCore
GNU General Public License v3.0
334 stars 28 forks source link

expose Javascript for Automation (JXA) #8

Closed kfix closed 2 years ago

kfix commented 9 years ago

write an Applescript that can package a basic MacPin app from MacPin.app's Resources, Icon png, and start URL. Make it launchable as a menu option in MacPin itself and able to publish derivative of current app.

kfix commented 8 years ago

Another thought I had: since I've exported MacPin as a public NSApplication(Delegate) in f3a5394, I can publish it as a .framework.

I could then provide a Script Editor template applet that essentially does main.swift's tasks but written in AppleScriptObjC or JavaScriptForAutomation. Script Editor provides GUI for changing bundle-id and icon on such templates. You could shim/intercept all launch, openFile or notification call as well. This would allow bundling custom MacPin apps without Xcode installed, as well as reducing the amount of JXA surface exposed in the underlying MacPin scripting API.

kfix commented 2 years ago

JXA is probably on the way out of macOS. Should open another ticket to remove what little integration we've got.