Is this possible? Modal dialog that user cannot just kill?

Hi - very brief summary first so I don't bore you:-

is it possible to popup a modal dialog (that re-centers itself on the screen) and is difficult (if not quite impossible) for the user to close down?

Some more detail:-

I've been asked to look into writing an Applescript that will auto start when the users logs in and check they are up to date on a particular task. If they have not I need to popup a dialog box (on top of any other window).

Initially this will just be a reminder - but after a certain number of 'nags' and they still haven't done the work I need to make the dialog modal, keep itself centred (i.e. move it back if the try and move it out the way) and don't allow them any easy way to close it until they choose to launch the app that I'm waiting them to complete their work in!

I'm completely knew to apple programming so please treat me like the noob I am! I am reasonably familiar with Unix and shell script (so I understand a user could 'kill' the process if they knew what they were doing!).

Thanks very much in advance!

Jonathan

Mac, Mac OS X (10.6.3), none

Posted on Nov 1, 2010 2:46 AM

Reply
5 replies

Nov 2, 2010 4:00 AM in response to rccharles

thanks for the reply 🙂

I hadn't thought about repeatedly nagging - is it possible to stop the user from just killing the process altogether? I'm familiar with firing up scripts from cron in unix - so maybe an option (if possible!) would be to fire a unix shell script every 'x' minutes - then if that decided they haven't done what they should it could pop-up a nag - and nag them more and more frequently until they do it!

Nov 2, 2010 12:12 PM in response to JHartApple

Seems like an experiment is called for.

Here is an applescript file running from the terminal. The applescript file does an ls -ld on some directory. Notice the open command.
!http://farm2.static.flickr.com/1197/5140623184_41a1f1d03b.jpg!

I did read there is/was some run-around about issuing a display dialog from unix. There is a workaround. Maybe you have to get in the right environment.
I did a google search on display dialog unix
http://www.devdaily.com/mac-os-x/applescript-shell-unix-command-line-bash-dialog

Fyi:
osascript
#!/usr/bin/osascript

Robert

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is this possible? Modal dialog that user cannot just kill?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.