Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Use Automator to ask before application launch Apps
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:
  1. 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.
  2. Finder Library, Launch Application action. Use the pop-up menu and choose your renamed Solitair (xyz.app) from the list.
  3. 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.
In the Finder, select the original backup of Solitaire.app and press Command-I. Click on the icon at the top of the info box so that it is selected. Choose Copy from the Edit menu. In the Applications folder, find your (new) Solitaire.app, and press Command-I. Click the icon and hit Command-V (Edit: Paste). You can optionally change the icon of the xyz.app version of Solitaire (in your Applications folder) into something obscure, like an icon copied from an AppleScript or a TextEdit document.

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.
    •    
  • Currently 2.40 / 5
  You rated: 1 / 5 (5 votes cast)
 
[11,832 views]  

10.4: Use Automator to ask before application launch | 8 comments | Create New Account
Click here to return to the '10.4: Use Automator to ask before application launch' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Use Automator to ask before application launch
Authored by: edified on Aug 22, '06 08:37:34AM
Now that's just funny! It might be neat to write an incrementer that counts the number of launches and gives different messages.

Cheers, Ed Palma

---
-Ed Palma
http://edified.org/

[ Reply to This | # ]

10.4: Use Automator to ask before application launch
Authored by: rspress on Aug 22, '06 09:21:19AM

I take it this solitaire application is a third party program?



[ Reply to This | # ]
10.4: Use Automator to ask before application launch
Authored by: jacobolus on Aug 22, '06 10:32:05AM

Rob, why are you publishing this? And if this is what you're looking for, are pranks in general fair game? There are an awful lot of pranks possible on a Mac, but it seems to me people should figure them out for themselves instead of reading about them on MacOSXHints,. ;)



[ Reply to This | # ]
10.4: Use Automator to ask before application launch
Authored by: Alerav on Aug 22, '06 11:15:53AM

is there a way to change the automater icon in the "Ask for Conformation"?



[ Reply to This | # ]
10.4: Use Automator to ask before application launch
Authored by: Bakari on Aug 22, '06 12:11:04PM

I think it's a quick neat idea, though I'm not sure why I would need it on a application.



[ Reply to This | # ]
10.4: Use Automator to ask before application launch
Authored by: osxpounder on Aug 22, '06 03:20:43PM

It'd be helpful for me if there were a way to intercept Eject button presses, and ask me if I'm sure I want to eject [with a *keyboard navigable* way to respond Yes or No]. Since getting my first Apple laptop in many years, I find I'm constantly hitting the Eject key instead of the Delete key.



[ Reply to This | # ]
10.4: Use Automator to ask before application launch
Authored by: NewPerfection on Aug 23, '06 05:57:28PM

To fix your eject problem on your keyboard, set your function keys to normal F1-F13 so that you have to hold down the function key in the bottom left of your keyboard to make the eject key work. The option for that should be under the keyboard preferences, I don't have my iBook with me so I can't look.



[ Reply to This | # ]
10.4: Use Automator to ask before application launch
Authored by: appellation on Aug 29, '06 12:15:48PM

Does anyone know how to put a "Do not show this message again" checkbox on the ask window? I get the feeling it's not possible since Automater-made apps don't have preferences. Still, I thought I should check the forums to be sure.



[ Reply to This | # ]