Aug 22, '06 07:30:00AM • Contributed by: soulbarn
My co-worker plays solitaire on his Mac all the time. As a gentle reminder, I created an Automator script that masquerades as a friendly message asking if the user really wants to play that game of Solitaire. If the answer is yes, then the game launches as usual. Here's how I did it; you can use this same technique to add a warn-before-using step to any application.
First back up the real Solitaire.app by making a copy of it and putting it somewhere it won't be noticed, like in your documents folder. This is in case you mess up. Next, rename the original Solitaire.app in the Applications folder to something obscure like xyz.app.
Now launch Automator, and move each of the following actions into the blank work area on the right:
- Automator Library, Ask for Confirmation action. Enter text in the both the Message and Explanation fields. I used Are you trying to play Solitaire? in Message, and This is just a friendly reminder. You have played Solitaire quite a number of times in the past several months. While we appreciate anything you do on your Mac, we're just checking: are you sure that you want to damage your productivity so much? If so, and you wish to continue playing Solitaire, simply press "OK." Of course, you can use any text you wish.
- Finder Library, Launch Application action. Use the pop-up menu and choose your renamed Solitair (xyz.app) from the list.
- Choose File: Save-As in Automator. Name the action Solitaire.app, and set the File Format pop-up to Application. Save it in the Applications folder.
Now test the program and make sure it all works.
To reverse, just drag the new Solitaire.app from the Applications folder to the trash. Drag the backup of Solitaire.app from your Documents folder back to Applications. Test it. If it works, trash xyz.app. You should probably only do this to somebody with a good sense of humor. Our solitaire-addicted partner actually appreciated the gesture.
