Applescript to make terminal close automatically?

Hi,
I have a relitivly simple question about doing a simple task with applescript.
I want to automate changing the "when the shell exits" menu in terminal.  From "Don't close the window" to "Close the window".
How would I go about doing this?
Thank's for the help!
- Ridog

Hi Roger,
This is fairly straighforward in Applescript. You could try something like the script below. Depending on the number of events in the calendar it's possible this could take time. The script should let you know when it's done.
Just in case you don't like the result. Backup, just in case. In iCal go to File>Back up Database... and save your calendars.
--Copy blue text into Script Editor (Applications > Applescript > Script Editor) , press Run and follow prompts. If you are happy with the results you could save it as an Application.
tell application "iCal"
-- Select calendar
set myCal to first calendar whose title is (item 1 of (choose from list (title of (every calendar) as list) with prompt "Choose calendar"))
-- Loop through events
repeat with myEvt in events of myCal
-- Get start & end times of event
set {startTime, endTime} to {start date of myEvt, end date of myEvt}
-- Check start and end hours & mins
set hoursAndMins to {hours of startTime, minutes of startTime, hours of endTime, minutes of endTime}
-- See if start and end time are midnight, if so set to all day.
if hoursAndMins is equal to {0, 0, 0, 0} then set allday event of myEvt to true
end repeat
display dialog "Done all day events"
end tell
Best wishes
John

Similar Messages

  • Is there a way to make the flyout window for the adjustments panel close automatically?

    The flyout window for the tool on the adjustments panel is OK, although I'm not thrilled that it takes up space inside of the image.  Is there a way to either make it open within the panel the way it did in CS5 or close automatically when you have finished making adjustments?

    Just to help with terminology in the future...
    The Adjustments is not in itself normaly called a ''flyout window'', and it operates like other panels and responds to the settings R_Kelly has mentioned.
    There's a menu sometimes called the ''fly-out menu'' that you get when you click the little icon at the upper-right corner of the Adjustments panel.
    I just wanted to mention the distinction because experts may at first be confused if you describe a panel itself as ''flyout'', even though that's what they do. 
    -Noel

  • Why is it no longer possible to make the download window close automatically after downloading is finished ?

    Only two days ago the download window closed after downloading.
    What happened ?
    And why is there a new and less efficient download window ?

    Firefox now manages the downloads in the Downloads folder in the Library (History > Show All History > Downloads) and download are treated as history items.
    *https://support.mozilla.org/kb/Downloads+window
    So you open the Library if you inspect all downloads and this Library window doesn't close automatically.
    When a download is in progress then you see a download progress (timer) bar on the Navigation Toolbar instead of the Download Manager button and that button is highlighted once the download has finished to make you aware the their are new downloads.
    You can view the new Download Manager in a tab by opening the about:downloads page and consider to open this page in a separate window.
    You can set the Boolean pref browser.download.useToolkitUI to <i>true</i> on the <b>about:config</b> page to restore the classic Download Manager window and make all download settings appear in "Tools > Options > General".
    *http://kb.mozillazine.org/about:config

  • Can I make Skype quit automatically when I close i...

    I'm sick of having to close it on the task bar and then confirm I don't want it running any more.
    I've already confirmed I wanted to log out and close the program, why is it still running?
    I cannot find an option to quit from the menu whilst running, but I imaging it's buried somewhere.
    Could somebldy tell me how to either 'quit' automatically when I close the program, or if there is an option to close and quit while it's open?
    Failing that could I find out why it's do ******* important that it stays running in the backlground after I close it the first time?
    Solved!
    Go to Solution.

    This screenshot (http://community.skype.com/t5/Windows-desktop-client/Can-I-make-Skype-quit-automatically-when-I-clos... is from the currently latest Skype 6.7.0.102 version, but exactly the same window is shown with any previous version too.
    If you sign out of Skype before quitting, then the “Do not ask me again” option will not be shown. You don’t need to sign out before quitting!!!!

  • Can you make core center automatically close after being called on startup?

    Can you make core center automatically close after being called on startup so it can set cpu fan speed to a slower fixed speed then exit?
    If core center really cant do such a simple task then can speedfan or another program?

    Quote from: bassmadrigal on 13-July-05, 07:42:36
    Why don't you want them running. Speedfan has a very small footprint.
    Just seems unnecesary seeming as it does its task as soon as it runs and its changes then stay applied. Speed fan is probably better but core center takes 10mb.
    Quote from: syar2003 on 13-July-05, 07:57:02
    You dont have to have it running to set a user specified fan rpm .
    Once it's set it is stored in the corecell/cmos chip on the motherboard .(until a cmos reset) .
    So to answer your question .
    There is no need to have it autostarted at each boot ...
    Thats how i have used it .
    Only reason to have it running is with MSI's "CnQ" control of the fan , varies with the load of the processor
    Thats strange for me the speed resets to default as soon as I restart my pc (about when the bios engages which is however tangibly after the graphics card fan revves up to its full speed). Depending on the temperature of the proccessor it goes to 3300rpm (less than 42c) or 4500rpm (too loud for ~45c IMO and MSIs "cool&quiet" option seems to agree, it doesn't even set it as high as 3300rpm)

  • When viewing documents on a Web Server, IE automatically opens a blank page and then opens the document in the default program. The blank screen should close automatically but isn't happening.

    So here is the situation, my company uses a third party scanning software, that puts documents scanned or created onto a webserver. We use a program that grants a user access to view the documents on the webserver. The user will have to log into the system
    using credentials, we have Kerberos doing this. Once the user is logged onto the system they navigate to the document they want to view or edit. So the user wants to view a .pdf file, they click the document they want, and it is supposed to open in the default
    program associated with file extension. ie: .doc would open Word, .xls would open Excel. When the document is loading in the default program Internet Explorer opens a blank page, this page is supposed to prompt the user if they want to open or save the document.
    (I changed the registry to have the files selected to automatically open without this prompt.) The blank screen generated is still staying open, this screen is supposed to close automatically after the prompt or close automatically after the document is opened.
    So when a user is looking at several documents, this floods the screen with all these blank Internet Explorer pages. This problem is only occurring for users that have Windows 7 PC's, XP users do not have this problem at all. My PC is the only one in the company
    that is Windows 7 64-bit, and working properly with the IE blank page automatically closing. I'm wondering what can be done to fix this problem, is it as simple as registering some .dll files or do I need to make a registry change? Any help would greatly be
    appreciated.

    What is the registry change exactly?  Sounds like one which is supposed to avoid the prompt.  I know
    that there used to be such a thing, before the new prompt and I know that some users think that there should be such a thing for any program but I'm not sure if that expectation is valid or not.  I think this may also be related to a concurrent change
    in the OS.  E.g. in XP we had File Types Options editor but starting in Vista that was removed.  You might get some more clues on this tack from NirSoft's FileTypesMan utility.
    The registry change that I did was to remove the open and save prompt. I will be sure to look into that. Our company
    isn't worried about the user's automatically opening the files since they are all trusted. They also do not have the ability to install anything, so if they were to download a potentially harmful file they could never install it. We monitor downloads as well,
    if they download files off the internet that aren't work related we remove their download capabilities.
    Sounds like a scenario for using ProcMon to take two traces and compare them for their essential differences.
    I talked to my boss about using this tool and he is worried about using it. I'm only an intern at my office and do not have the authority to use a program without their knowledge or consent. I will run the idea by them again and see if it's okay I use this.
    I'll maybe make some presentation about how it can help us with our problem and how much time and money it will save. Because I really want to get down to the bottom of this.
    Probably the most significant thing is going to be the Content-type that the files are being served by. 
    You could use the Developer Tools, Network Capture to check on that and ProcMon could help explain what happens after that.  A related workaround to change the symptom when the Content-type is not what is expected is to disable MIME Sniffing (e.g. in
    Security options, Miscellaneous section).  In fact, perhaps that could explain your machine's difference with anyone else?  MIME Sniffing is a default, previously known as "save according to type not extension" (or some such wording).
    Okay I will be completely honest I have no idea how to use Developer Tools (F12), yes I could google it, when I tried using it on the blank pages it would never work, I also have no idea what I'm looking at. I should mention that I do not have access to
    the web server. Our programming and development side only has access to our AS400, which is where the web server is located. I do have MIME Sniffing enabled and so does everyone else. I may be wrong but, I believe it is needed in order to open the file extension
    in the correct default program, yes? I thought MIME Sniffing would see a .docx file and then find the appropriate program to open that .docx file in. I may be wrong but I know it's used somehow along these lines.

  • How to have TOC close automatically

    Hi,
    I am using CP5 and AS3. I am currently using the Table of Contents that is provided within Captivate. If you select a page from the TOC, it goes directly to the page but it does not close the TOC.
    Is it possible to have the TOC close automatically after I choose a slide?
    Thank you,
    Frank

    @Lilybiri
    I dug around the net and tried making my own widget to have this done, but I ran into a bit of an issue. So far, I used this code in the widget:
    var myRoot:MovieClip = MovieClip(root);
    var mainmov:MovieClip = MovieClip(myRoot.parent.root);
    mainmov.cpLockTOC = 1;
    I was able to lock the TOC on the click of a button. Would you think it possible to make it so that the code automatically plays when someone enters a page within the captivate? As well, if that is possible, could I somehow switch the "cpLockToc" with a "hideTOC" code? Any thoughts/suggestions?
    Thanks,
    Frank

  • Merge pdf's forms, change text field name and Acrobat x pro closes automatically

    I merged 20 pdfs in one interactive pdf, but when I try to change the name of the text fields (in orden to make the interactive independent from the other fields) the program close automatically. I tried to change the name of the text fields in each pdf before merge and it's the same problem. what can i do?

    I merged 20 pdfs in one interactive pdf, but when I try to change the name of the text fields (in orden to make the interactive independent from the other fields) the program close automatically. I tried to change the name of the text fields in each pdf before merge and it's the same problem. what can i do?

  • My application adobe ideas closes automatically

    my application adobe ideas closes automatically, I have an iPad 4 with all updates, so what's the problem?

    Hello,
    my app is fixed, I uninstall and reinstalling and now is working perfect. The only issue that remains is the synchronized, creative cloud always makes copies of my works adding the word "conflicto" to every file name.
    THank you very much
    Alyda

  • Reader X closes automatically when pressing any key

    Hi everyone, I updated the Reader yesterday and now the following occurs:
    I may adjust the toolbars, make snapshots, print, etc. - but whenever I am hitting the keyboard, either when trying to enter a comment or when choosing side numbers in the printer menu, the program closes automatically without further comment, error message, etc. It may be opened again without any problems, but I cannot find a solution to the keyboard problem. I am using Windows XP, SP 3.
    Thanks in advance for your help!

    I was having this issue today on a co-worker's machine.
    However I found a solution thanks to brian.hart.
    Go into your registry editor (Run >> regedit)
    Go to Hive [HKEY_LOCAL_MACHINE\Software\Policies\Adobe\Acrobat reader\10.0\FeatureLockDown]
    Right click >> go to New >> DWORD
    Give it the name "bProtectedMode"
    Hit okay. Close Regedit. Win.
    You may have to restart the computer. I didn't have to though.

  • Tomcat Server window closes automatically when I start it

    Hi,
    I am using Apache Tomcat 4.1 to work a small Web application. Each time when I start the Tomcat server the window comes up and closes automatically. Is something wrong with my configuration ?
    Do I have to make any changes to server.xml ?
    Pls help..
    Thanks,
    bobby.

    I think Tomcat 4.1 works fine with JDK1.5.0. Untill last week I was able to work on my application.
    This problem started after I did a reboot. Ever since then I am having this problem
    I tried to set the JAVA_HOME from the CATALINA_HOME dir and this is what I got,
    C:\PROGRA~1\APACHE~1\Tomcat 4.1\bin>set JAVA_HOME = C:\PROGRA~1\JAVA\jdk1.5.0_0
    C:\PROGRA~1\APACHE~1\Tomcat 4.1\bin>catalina run
    The JAVA_HOME environment variable is not defined correctly
    This environment variable is needed to run this program
    NB: JAVA_HOME should point to a JDK not a JRE
    Using CATALINA_BASE: C:\Program Files\Apache Group\Tomcat 4.1
    Using CATALINA_HOME: C:\Program Files\Apache Group\Tomcat 4.1
    Using CATALINA_TMPDIR: C:\Program Files\Apache Group\Tomcat 4.1\temp
    Using JAVA_HOME: C:\Program Files\JAVA\jdk1.5.0_00
    '-Dsun.io.useCanonCaches' is not recognized as an internal or external command, operable program or batch file.
    And when I did a sanity check this is what I got,
    C:\PROGRA~1\APACHE~1\Tomcat 4.1\bin>dir C:\PROGRA~1\JAVA\jdk1.5.0_0
    Volume in drive C is PCSRP21
    Volume Serial Number is D84F-A786
    Directory of C:\PROGRA~1\JAVA
    File Not Found
    C:\PROGRA~1\APACHE~1\Tomcat 4.1\bin>dir C:|PROGRA~1\JAVA\jdk1.5.0_00
    The system cannot find the path specified.
    C:\PROGRA~1\APACHE~1\Tomcat 4.1\bin>dir C:\PROGRA~1\JAVA\jdk1.5.0_00
    Volume in drive C is PCSRP21
    Volume Serial Number is D84F-A786
    Directory of C:\PROGRA~1\JAVA
    File Not Found
    Does this imply Tomcat is not able to recognize my Java directory ?
    Thanks,
    bobby.

  • Facebook opens and after afew seconds, it closes automatically. How do I fix this?

    I have the new ipad4 I have downloaded Facebook several times. Each time I go to use it, Facebook opens and after afew seconds, it closes automatically. How do I fix this?

    What do you mean " I have downloaded Facebook several times"? Did you install the app and delete it several times?
    try this
    Make sure IOS is updated to latest version
    How to update your iOS device
    http://support.apple.com/kb/HT4623)
    Make sure iTunes is updated to the latest version
    Reboot device by pressing both the home button and sleep/wake (power) buttons at the same time for 10-15 seconds until the apple logo appears on the screen, then let go.

  • Today i download adobe cs6 , and install in as trial, when i open my cs6 , it open and close automatically

    Today i download adobe cs6 , and install in as trial, when i open my cs6 , it open and close automatically
    i want to try the adobe cs6 , 1st in trial time
    i am beginner for Photoshop,

    os win 7
    process: Intel(R) Core (TM) i3cpu 540 @ 3.07Ghz 3.06
    Ram: 4GB
    Type: 32 bit

  • Whenever i start my ipad2 the applications automatically starts to open and close automatically jumps from one screen to another

    Whenever i start my ipad2 the applications automatically starts to open and close automatically jumps from one screen to another cannot operate the ipad at all, tried switching off and back on again, also restored the ipad but of no use

    try restart
    http://support.apple.com/kb/HT1430

  • Since recent updates, I have noticed that my apps close automatically when I am distracted. In some cases it is time consuming to sign back in and get back to the task I was doing. Is it possible to change a setting so the apps will stay open?

    Since recent updates of iOS, I have noticed when using my iPad that my apps close automatically when I have to leave the room or am otherwise distracted for a few minutes. It is sometimes time consuming to sign back in and get back to the task where i left off. Is there a setting I can change so it will keep the apps open until I am ready to close them? Thanks for your help.

    Did you have this problem before Restoring you iPad?
    If you did then did you restore with a backup. You may have reinstalled something that is conflicting in this back up
    If not then sounds like either something went array with the clean install or a hardware issue.
    I know it's long winded but have you tired a clean install then downloading the apps again?
    PJRS

Maybe you are looking for

  • Iphoto would not import movies from Iphone 4 - ANYBODY ELSE HAS ISSUES?

    Hello, Yes Iphone 4 is so sexy. I have reception issues too unfortunatly , only where reception is weak anyway, but yes it happens... also iphoto would not import most of the times the iphone 4 videos? any suggestions why and how to fix it ? Many thx

  • Question  on MIGO and MIRO

    Hi All, I have a question like is there any role like that we have first do MIGO (Goods Receipt) and then go to MIRO (invoice receipt r verification) r we can do either of them first. Please give me clear clarification on this. Thanku

  • How to change pdf page in an iframe content automatically

    I open a pdf in my web page with <iframe> and the pdf-option for example #page=2 equals week number 2 of a year. How could I change the viewable page as a function of the actual week number of a year (#1 - 52) At the moment my html code looks like: <

  • Oracle Management Server Service not starting

    OS: windows 2000 Server Ora version: 8.1.7 I have checked all the services are started and database is up but when i am trying to start OMS service "oemctrl start oms" its giving the message.. ... service could not be started ... the service did not

  • Adobe Flash Player 12 installation issues

    Are there specific steps to take if you have a new mac equipped with Windows 8 and parallels?