Go Back   MacRumors Forums > Apple Systems and Services > OS X

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 20, 2005, 04:18 AM   #1
Yaja123
macrumors regular
 
Join Date: Mar 2005
Any way to close an app automatically? Schedule? Automator?

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.

Last edited by Yaja123; Nov 20, 2005 at 04:49 AM.
Yaja123 is offline   0 Reply With Quote
Old Nov 20, 2005, 04:29 AM   #2
generik
Banned
 
generik's Avatar
 
Join Date: Aug 2005
Location: Minitrue
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>
generik is offline   0 Reply With Quote
Old Nov 20, 2005, 04:52 AM   #3
Yaja123
Thread Starter
macrumors regular
 
Join Date: Mar 2005
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.
Yaja123 is offline   0 Reply With Quote
Old Nov 20, 2005, 05:41 AM   #4
satans_banjo
macrumors regular
 
Join Date: Sep 2005
Location: SE London
Send a message via AIM to satans_banjo Send a message via MSN to satans_banjo Send a message via Yahoo to satans_banjo
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
satans_banjo is offline   0 Reply With Quote
Old Nov 20, 2005, 05:55 AM   #5
kanaka
macrumors member
 
Join Date: Jul 2002
Quote:
Originally Posted by Yaja123
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.
kanaka is offline   0 Reply With Quote
Old Nov 20, 2005, 01:15 PM   #6
Yaja123
Thread Starter
macrumors regular
 
Join Date: Mar 2005
Quote:
Originally Posted by kanaka
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.
just got around to it.

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

thankyou
Yaja123 is offline   0 Reply With Quote
Old Nov 28, 2005, 01:15 PM   #7
Will Cheyney
macrumors 6502a
 
Will Cheyney's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Send a message via AIM to Will Cheyney Send a message via MSN to Will Cheyney
Awesome. I didn't know iCal could schedule the launch of a file!
__________________
Love your Mac 3.06Ghz 24" iMac, 4GB RAM, 2.5TB HDD.
Will Cheyney is offline   0 Reply With Quote
Old Aug 23, 2011, 11:56 PM   #8
mlschmid26
macrumors newbie
 
Join Date: Aug 2011
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!
mlschmid26 is offline   0 Reply With Quote
Old Aug 24, 2011, 04:50 AM   #9
Hansr
macrumors 6502a
 
Join Date: Apr 2007
Launchd should take care of such tasks. Check http://www.peterborgapps.com/lingon/ for help in generating the xml.
Hansr is offline   0 Reply With Quote
Old Aug 24, 2011, 04:56 AM   #10
Jolly Jimmy
macrumors 65816
 
Jolly Jimmy's Avatar
 
Join Date: Dec 2007
Woah old thread

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.
Jolly Jimmy is offline   0 Reply With Quote
Old Mar 19, 2013, 02:00 PM   #11
sonaras
macrumors newbie
 
Join Date: Jul 2012
How about if I only want the auto close to work when the application is inactive for a certain period of time?
sonaras is offline   0 Reply With Quote
Old Dec 7, 2013, 11:18 AM   #12
Ckar
macrumors member
 
Join Date: Nov 2013
Quote:
Originally Posted by sonaras View Post
How about if I only want the auto close to work when the application is inactive for a certain period of time?
Bump for an old thread. I want to know the answer to this question too.
__________________
MacBook Pro (15-inch, Mid 2010)
iPad Air (16GB, Wi-Fi)
MacBook Air (13-inch, Mid 2014)
Ckar is offline   0 Reply With Quote
Old Dec 7, 2013, 12:19 PM   #13
meme1255
macrumors 6502
 
Join Date: Jul 2012
Location: Czech Republic
What means *inactive* ?
__________________
MacBook Air 11" 2012, iPad Mini Retina iOS 8.0.2 64GB LTE, iPhone 5 64GB iOS 8.0.2
PSPad for Mac Cider games [ C&C 3 etc.]flicker fix
meme1255 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
open and app or link on schedule johnnygroove iPad Tips, Help and Troubleshooting 0 Mar 27, 2014 11:09 AM
iPhone: Safari and Email Automatically close ivreal Jailbreaks and iOS Hacks 5 Jan 7, 2014 05:01 PM
Applescript to make terminal close automatically? Ri-dog Mac Programming 1 Jan 18, 2013 01:53 PM
How to close all Apps automatically on iOS 6? Bankaimadness iOS 6 7 Nov 8, 2012 11:19 AM
Is there a way to schedule a program to close and reopen daily? ChaoticBliss OS X 3 Sep 18, 2012 03:19 PM

Forum Jump

All times are GMT -5. The time now is 10:25 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC