Can anyone help. This could be a very simple thing but i have had no luck finding a script to do the following and i have no scripting experience:
I would like a script i can run when i leave work that comes up with a simple message that won’t let you use the computer until you click OK. The reason being, i would like to find out if our cleaners are fiddling with the computers and would like to warn them off. I used to have a script that did this but lost it in the transition to MacOs X. It needs to be a simple dialogue, that simply says ‘To continue using this computer please click ok’ that way i know if anyone has used it. It needs to allow Retrospect to continue with its work in the background. It doesn’t need to be high security, just enough to ward off prying eyes.
Has anyone written a script similar to this, or know of any?
Browser: Safari 312
Operating System: Mac OS X (10.3.9)
You don’t need a script. Try running the applicatin Keychain Access. In the View menu, you can set it to add an icon in the menu bar by clicking Show Status in Menu Bar. From this menu, you can lock the screen and applications still run in the background. You should test it first with your app that you need running.
Thanks Kel, this kinda solves the problem, unless someone knows the password and knows how to lock the screen again.
I used to have a script that i ran that just left a dialogue box on the screen, once you clicked ok, you couldn’t get the message back unless you knew where the script was. That way i knew if anyone had been on my computer while i was away.
I cant remember where i got the script from or where it is now. Just wondered if anyone had come across anything similar.
Dialogs are different now. When you display a dialog, you can still switch to other apps while leaving the dialog open. It used to be where all focus was on the dialog.
It shouldn’t be to hard thinking of a way to do what you want. I have to go to sleep now but will be thinking about it unless someone else posts something.
I had several ideas and here’s one.
tell application “ScreenSaverEngine” to activate
set f to true
tell application “System Events”
if not (exists process “ScreenSaverEngine”) then set f to false
if not f then
beep 3 – used for testing
return 5 – seconds
Note that “ScreenSaverEngine” should still be the fronmost process even after the display goes to sleep. I am assuming that you have the same settings as mine where only the display goes to sleep. When the user wakes the computer or turns off the “ScreenSaverEngine”, the script will quit. You should save this script as stay open application. You can change the number of seconds it returns to the idle handler also.
Interesting solution, Kel. The problem as I see it is that the script should write to a log when it’s quit because when the OP comes in and stops the screensaver, how will he know if the app was running?
Good catch Jon! Thanks.
I added writing the quit date and time to the comment of the script app.
tell application "ScreenSaverEngine" to activate
set f to true
tell application "System Events"
if not (exists process "ScreenSaverEngine") then set f to false
if not f then
return 2 -- seconds
tell application "Finder" to set comment of (path to me) to ((current date) as string)
Emoboy, you can get the quit time by looking at the comment of the script. Also, it might be better to keep the idle time down to 2 seconds. This gives the culprit less time to get the location of the script from the dock.