• Careful, it might gain sentience 😐

  • So does this only work if users have Xcode installed or does this enable us to execute arbitrary Swift scripts whenever and however we like (ie as sort of replacement to AppleScript)?

    • This probably deserves a post of its own, but you can use System and NSTask to run anything (sandbox allowing), and Swift can be use directly to script at the command line.

  • Your use of 0777 for permissions isn’t really Octal – see the Swift Manual – you need a “0o” prefix (Swift iBook, section on “Numeric Literals”)

    • Even more so: I don’t need to change permissions at all. Feel free to delete those lines. They are leftover from an earlier experiment.