I'm using the following script
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>my.script.keeprunning</string> <key>KeepAlive</key> <true/> <key>ProgramArguments</key> <array> <string>/path/to/file</string> </array> </dict> </plist>
to run an app even when it crashes, but after system restarts it the focus switches to that specific app. How can I improve the script to run the app hidden or minimized? Would it be easier to write applescript for it and run it as service?
Thank you for your suggestions ;)