5 ms·
Honest question, since my days with OSX are far behind: why would I want to do this in Applescript if the only thing this does is start the python http server?
by klez 4y ago
Honest question, since my days with OSX are far behind: why would I want to do this in Applescript if the only thing this does is start the python http server? In other words, what advantage does it offer over just directly running the command?
- smcl 4y agoIf I remember correctly (been a while since I played with Applescript) I think you could save a script and set up the UI so that you can launch it in the macOS UI (instead of firing up a Terminal.app and entering the command by hand)
- teddyh 4y agoIs macOS unable to launch shell scripts using the UI?
- smcl 4y agoMight be something a more current macOS user would have to answer. I just remember doing this using a little applescript menu icon on the topbar. edit: now that I think about it, I did use "bitbar" for a while which is actually a little bit more powerful still. I can't find it any more but this looks similar - https://github.com/matryer/xbar#get-started https://github.com/matryer/xbar#get-started
- rsfinn 4y agoNo; if you give a shell script the .command extension (and make it executable), then you can double-click it in the Finder to open and run it in the Terminal application.
- russellbeattie 4y agoYou can use the Script Editor to save your Applescript or JavaScript script as a .app which can be distributed as you'd like. https://support.apple.com/guide/script-editor/welcome/mac https://support.apple.com/guide/script-editor/welcome/mac