I want to have an alert / dialog box to fire up periodically in foreground.
I tried a combination of AppleScript and
launchd and managed to have the script (actually converted to a app) fired up periodically via launchd. However, the alert box does not show up in front of all other windows (rather totally hidden until I tab to it – though it does get started via
launchd). How can I get it in front?
My script is as follows:
on run activate me --> tried to get alert in foreground --> didn't help, though display alert "Should show up in foreground..." end run
My launch.plist is (in
<?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>bernhard.sitstraight.plist</string> <key>Program</key> <string>/Users/bernhard/programming/periodic.app/Contents/MacOS/applet</string> <key>RunAtLoad</key> <true/> <key>StartInterval</key> <integer>1200</integer> </dict> </plist>