Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Yaja123

macrumors regular
Original poster
Mar 19, 2005
164
0
Any way to close an app automatically? Schedule? Automator?

I dont know much about these things. I have a program i use called IMSafe and Webstractor which i can get to open automatically using ical but i dont know how to close it.

anyone know?

thanks.
 
There is a way with terminal..

Using iCal as an example, to start iCal I run the command /Applications/iCal.app/Contents/MacOS/iCal &

It will then display a number which is the process ID.

To kill it just type kill <process id>
 
i dont understand... maybe i should clarify.

eg, I have IMSafe open at 2.40 pm everyday (using ical alarm feature - open file).. it then does its automated backup of various files. THEN what i would like is for it to close/quit automatically at 2.50pm without my intervention, just as it open without me doing anything.
 
get iCal to run a script at the time you want it to shut down. that script should activate the terminal command that generik just mentioned
 
Yaja123 said:
i dont understand... maybe i should clarify.

eg, I have IMSafe open at 2.40 pm everyday (using ical alarm feature - open file).. it then does its automated backup of various files. THEN what i would like is for it to close/quit automatically at 2.50pm without my intervention, just as it open without me doing anything.
There are several ways to do this, but if you want to schedule the app to quit automatically with iCal here's one thing you can do:

  1. Open Script Editor (in /Applications/Apple Script/)
  2. Create a new script with this line:
    tell application "IMSafe" to quit
  3. Save the script somewhere and name it something like "Quit IMSafe"
  4. In iCal, schedule a new event at 2:50pm, and for the alarm select "Run Script". Then click the popup below which says "none", select "other", then select your "Quit IMSafe" script.
I just tested this with Stickies.
Code:
 
kanaka said:
There are several ways to do this, but if you want to schedule the app to quit automatically with iCal here's one thing you can do:

  1. Open Script Editor (in /Applications/Apple Script/)
  2. Create a new script with this line:
    tell application "IMSafe" to quit
  3. Save the script somewhere and name it something like "Quit IMSafe"
  4. In iCal, schedule a new event at 2:50pm, and for the alarm select "Run Script". Then click the popup below which says "none", select "other", then select your "Quit IMSafe" script.
I just tested this with Stickies.
Code:

just got around to it.

never used a script until today...it works - whoooppee!

thankyou :)
 
Anyway to produce this same result (i.e. close an application) after a set amount of time, say 5 or 10 minutes after start up.

I have an application that opens at start up, connects to the internet, but does not close. I would like it to close after it does it's thing, about 5 minutes after start up.

Is there a script or way to use Automator to accomplish this task?

Thanks!
 
Woah old thread :D

Try this :

Code:
tell application "App Name Goes Here"
	activate
	delay 300 -- delay before next action in seconds
	quit
end tell

Open it in AppleScript Editor and save it as an application, then add it to your login items instead of the app.
 
How about if I only want the auto close to work when the application is inactive for a certain period of time?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.