ICal Alarm - Pass Event data to AppleScript?

Is there a way that a script called by an iCal alarm can be passed event data as parameters?

This is a quick one I knocked up a while back to see if it was possible. The problem is that iCal doesn't tell the script what event triggered it, so you have to go looking ...
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">(*
called from iCal as on alarm, will speak the title of the alarm event
won't work for repeating events
AK ITCarlow Nov 2004
set Now to current date
-- Adjust FuzzSeconds to suit; if too big, close events will speak several times
set FuzzSeconds to 15
tell application "iCal"
set MyEvents to every event of every calendar where ((start date of it) ≥ (current date))
repeat with ThisEvent in MyEvents --scan the list looking for events that have triggered us
try
set MinutesBefore to (trigger interval of open file alarm of ThisEvent) as number
set TriggerInt to (Now - ((start date of ThisEvent) + 60 * MinutesBefore)) --notionally 0 for firing event
if (TriggerInt < FuzzSeconds) and (TriggerInt > (-FuzzSeconds)) then
say (summary of ThisEvent as text) & " at " & (start date of ThisEvent as text)
--could say other fields too eg location, description ...
end if
end try
end repeat
end tell
</pre>
AK

Similar Messages

  • ICal Alarm show event button broken

    When an iCal alarm reminder pops up, clicking the button to show the details of the event has no effect. This is a new problem since using the transfer wizard to move to a new computer.
    I tried deleting all the iCal preferences and searching the discussions, and to no avail. Any ideas of things to try or similar experiences?

    Hi,
    Try the Applescript "Fix Todo Alarms" on this page:
    http://www.nhoj.co.uk/applescripts/
    Best wishes
    John M

  • Alarming and Event Data Storage Locations

    I'm having a problem where the Alarms and Events files are filling up the system disk and causing Lookout to crash.  Is there any way I can set things up so that those files are stored on another disk?  I already have the Historical files being archived on a separate disk, but the alarms and events seem to have stayed on the System disk.  The system disk doesn't have that much free space all the time, which is why I put the historical files somewhere else.
    Also, I have the Historical Data system set to only archive data for 90 days (it was changed a while back from storing perpetually), but I still have files in the database going back years.  Is there a way to purge the old data out?
    David Dudley

    David,
    It's important to note the alarms and events are actually in a separate database from Citadel. 
    This KnowledgeBase article discusses removing/archiving alarms from the database:
    http://digital.ni.com/public.nsf/websearch/B23BDD585BAEB25086256C00005C2851?OpenDocument
    Moving the alarms database is a bit more tricky.  It uses the MSDE 2000 SQL engine, which defaults to using a database on the drive it gets installed to.  I think short of installing Lookout to another drive, there's no "easy" way to move it over.
    Message Edited by Paul M. on 04-08-2006 12:16 AM
    --Paul Mandeltort
    Automotive and Industrial Communications Product Marketing

  • Alarm and event logging has stopped

    Alarm & Event Logging with Citadel 5 and Lookout 6.02.
    I have a continuously running application that stopped logging alarms and events approx. 6 weeks ago. (March 07, 2010) The problem went unnoticed until a recent event/alarm sequence needed to be investigated. Data traces are not a problem. They are visible using MAX as well as with Lookout hypertrends. However, MAX shows nothing for alarms or events past that date. (No problem earlier, going back to 2002)
    The Alarm panel in Lookout will show the alarms and events as they occur so I know they're being detected.
    I understand that the data traces are logged to Citadel, whereas alarms and events are passed to the MSSQL server. (In my case the free version that comes with XP - SQL Server Express I believe.)
    This version has a database size limit of 4 GB. What exactly does that mean?
    An *.mdf file >4GB cannot be created?
    An *.mdf file >4GB cannot be read?
    The total size of all *.mdf files cannot exceed 4GB?
    Curiously the file in use is 1.99GB. When archived, it is only about 750 MB, yet the total number of alarms and events are the same in each. There are other *.mdf files that exist on the system but aren't in use.
    NI document 4GPBLT21 states  "Once that limit is reached, the alarm and event data is logged to the high performance Citadel database". Then what? Is that data viewable with MAX?
    MAX doesn't appear to have any tools to selectively delete old alarms or events.
    How can I determine what has happened and what do I need to do to restart the logging?
    Any and all help most welcome.
    Bob L

    Lookout 6.0.2 uses SQL Server Desktop Engine which has the limit of 2G, so your alarm/event database has already reached the limit.
    After the SQL database is full, the alarm/event will be logged to Citadel database. But this maybe reduces the performance of Citadel, that's why we log alarm/event to SQL Server first. But I'm not sure why the alarm logging is stoppted.
    To delete the alarms from SQL Server is not straightforward. One way is to archive it. Follow the steps below.
    1. In MAX, create a new database in different folder.
    2. Create a Trace View and add the whole old database to the trace view.
    3. Right click on the Trace View and select Archive. Archive all to the new database. You don't need to specify the time range.
    4. After the achiving, the new database will have all the trace data and no alarm data in it. You can detach the old database.
    In Lookout, select File->Modify Process to change the database to the new database. Or you can change the system default database from Option->System. And then the lookout process will use the new database which has no alarm in it.
    You can keep the old database files. All the data and alarm/events won't be lost. When you need them, you can attach the database.
    Ryan Shi
    National Instruments

  • How can I remove default alarm for events in iCal on devices ios?

    Whenever I add an event to my iCal calendar in Mounain Lion it will automatically add one default alert only on my iphone and ipad. These default alarms are not displayed on my macbook or icloud.com
    Default alarms are disabled in macbook, icloud.com, and my ios devices.
    How can I remove default alarm for events in iCal on devices ios?
    Thanks and sorry for my english.
    MacBook Pro, Mac OS X 10.8

    OK, so I have had this issue for the past several months. I think it all started when I upgraded to ML from SL and migrated my calendars and contacts to iCloud. That was a couple months ago. But now I am running 10.8.2, and about two weeks ago I upgraded my iOS devices to 6.0.1.
    I don't seem to be having any issues with events that I create now, but all those old events that were migrated to iCloud a couple months ago, many of those sound alerts on the iOS devices even though there was no alert defined when the event was originally created. I have always had alerts off by default both in iCal and on the iOS devices.
    So here's the question: is there a way to go through and disable all these spurious event alerts? I've been disabling them as the event reminders come up, but it's irritating. It would be nice if there was a way to turn them off all in one shot somehow.

  • Import Excel events, dates info to iCal

    I cannot seem to find the easy way to import excel events, dates, birthday, games etc. into iCal. There has to be an easy way.

    Hi jkuyio
    1. Regarding the connection string and the provider, are you using 64 bit or 32 bit?
    2. By the way, Your question is not related to this forum i think. I mean you can use SSIS for this and work with SQL Server database as well but i think this is not the right way to do it!
    In any case you can check this link for more information on connecting the MySQL from SSIS:
    http://blogs.msdn.com/b/mattm/archive/2008/03/03/connecting-to-mysql-from-ssis.aspx
    * Basically you can connect to any data source that you have the right data provider.
    ** Data from Excel spreadsheet can be exported to a new MySQL database table directly, by using the Export Excel Data to New Table optionhttp://dev.mysql.com/doc/refman/5.6/en/mysql-for-excel-export.html
    ** Data can be import into the MySQL as well:
    http://www.w3resource.com/mysql/exporting-and-importing-data-between-mysql-and-microsoft-excel.php
    I hope this is useful :-)
    [Personal Site] [Blog] [Facebook]

  • [Bug?] DSC - Clusters Different between 'Read Alarm.vi' and 'Alarm and Event Query.vi" but Contain 'Same' Data

    Howdy!
    Why are the clusters different coming out of the Read Alarm.vi and the Alarm and Event Query.vi when they have the exact same data?
    The only difference is the order of two last elements.
    I am leaning towards bug on this one, unless these clusters need to be distinct for some reason?
    Certified LabVIEW Architect * LabVIEW Champion

    Thanks for posting Ravens Fan
    I re-jiggered my API to reverse my datatypes then applied changes to my application code.
    It wasn't that painful to update. 
    My current understanding is that this bug affects one VI, so I decided it was easier to wrap that VI with the bugfix.
    Attached is my implementation if anyone wants it too.
    Cheers
    -JG
    [LV 2009]
    Certified LabVIEW Architect * LabVIEW Champion
    Attachments:
    Alarm & Event Query_bugfix.vi ‏30 KB
    Convert Alarm And Event Query Cluster.vi ‏21 KB

  • How do we pass the Business Event Data in the EBS business Events subscription Testing?

    HI,
    How do we pass the Business Event Data in the EBS business Events subscription Testing?
    --Khaleel

    Hi,
    Just to add what Dianne has said, whenever you are carrying out any configuration/ customising, you have to test all the related scenarios. For this you have to take help of the End Users who are in a better position to carry out this testing. If the affecting modules like FI, MM, SD, are many, then you also have to see how the cross-module enties are flowing.
    Regards,
    amit

  • HT2513 iCal string of events repeat and end on a given date?

    Is there a way to have any given string of events repeat and end on a given date?
    Example, I have a different training regiment for each day leading up to an event/date and then will have the same training regiment again leading up to another event. I want each day's training regiment to show up as an event per day... but don't want to have to post each days repeat string of training prior to each event... and they don't nessecarily repeat monlthy or regularly... I want to set an end date and all the training fill in from that date backwards. Is this possible??

    Does this work any better? New-jobtrigger requires a datetime object.
    $csv6=Import-Csv D:\Lzero\Coll_Schd\Dependent_List.csv
    foreach($cs in $csv6)
    {$sys=$cs.CI
    [datetime] $schd=$cs.RebootSchedule
    $user="Domain\username"
    $paswd=ConvertTo-SecureString -String "P@ssWord" -AsPlainText -Force
    $Credential=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $user,$paswd
    Register-ScheduledJob -Name System_Restart -ScriptBlock {
    Restart-Computer -ComputerName $sys -Force -wait} -Trigger (New-JobTrigger -At $schd -Once) -ScheduledJobOption (New-ScheduledJobOption -RunElevated) -Credential $Credential

  • ICal Alarm for birthdays

    I am unable to set an alarm for birthdays. I cannot believe that this is not possible to do, anyone got any ideas?

    Hi,
    A lot of people on this forum seem to want this feature.
    I have written an Applescript Studio application that duplicates the functioning of the birthdays calendar (syncing dates to iCal in the background), plus adding a lot of extra features, including alarms.
    Dates to iCal automatically syncs your Address Book birthdays, anniversaries and custom dates to iCal, creating alarmed, editable events in a seperate calendar. With Dates to iCal you can:
    - Add Address Book date events automatically to iCal.
    - Choose which event types you want added (birthdays, custom dates or both).
    - Have any type of alarm you like for the event, from a message to emailing a whole Address Book Group.
    - Choose the notice in days and hours the alarms are set for.
    - Manually make changes (i.e. adding notes) to these events.
    - Add birthdays manually for people you don't have a seperate card for in Address Book.
    It is freeware. To get a copy go to www.nhoj.co.uk.
    Best wishes
    John M
    Disclaimer: Although Dates to iCal is free, I do ask for donations on my site. So, in compliance with the Apple Discussions Use Agreement, I may receive some form of compensation, financial or otherwise, from my recommendation or link.
      Mac OS X (10.4.5)  

  • Disable ical alarms temporarily (e. g. for 2 hours) by apple script ?

    Hi,
    I'm searching for a way to disable the ical alarm pop-ups temporarily (e. g. for 2 hours).
    Is there a way to do that?
    Why?
    For people giving presentations with MS PowerPoint or Keynote it might be a problem if during the talk a window pops open - maybe even with private content..
    I know that there is the option in the preferences, but once I used it I forgot to re-activate the alarms, so it would be better to define for how long the alarms will be disabled before.
    Does anyone know how to do that?
    If there's no complete solution, it would at least be interesting to know how to access this option by AppleScript.
    Martin

    My iCal is up to date in OSX Lion and the script below is working for me. It doesn't actually take time into account, like beckmart had wanted and I'm not very applescript savvy so I just put it into an automator workflow using the script twice with a "pause" in between.
    tell application "iCal" to activate
    tell application "System Events" to tell process "iCal"
              click menu item 3 of menu 1 of menu bar item 2 of menu bar 1
              click button 3 of tool bar 1 of window 1
              click checkbox 1 of window 1
              click menu item 10 of menu 1 of menu bar item 3 of menu bar 1
    end tell
    tell application "iCal" to quit

  • ICal alarms won't Open File

    I created two Automator actions, one to mount a server and one to eject the server. Both actions work fine in the Finder. I saved them both as iCal plug-ins to run the same time every day. While the server is mounted Backup runs and backs up my Mac to the server.
    The problem is the Mount Server plug-in doesn't work, only the Eject Server plug-in, so when I come in to work each morning, Backup is waiting for the server. Then I have to mount it and wait 20+ minutes for Backup to run before I can get to work.
    Can anyone think of why this particular plug-in isn't working? When I go to ~/Library/Workflows/Applications/iCal/Mount Backup.app and simply double click the Automator action it works fine. It's iCal that's acting flaky. I've also tried an AppleScript that mounts the server, but that didn't work either. (ejecting still works fine)
    I'm stumped. Any help/clues would be appreciated. I'm running 10.4.5 on a Dual 1.8 GHz G5 with 3 GB RAM.

    Sorry, I'm a long time "end user." The terminal makes me nervous. But I did end up fixing the problem.
    I was setting the iCal alarm to open at a specific time during an all day event. (i.e. all day event, alarm set for 7:00 pm) That wasn't working. When Automator created the event it set it as a timed event with an untimed alarm (i.e. 7:00 pm to 7:00 pm, alarm set to 0 minutes before) which makes less sense to me, but it works so what do I know. I adjusted the repeat schedule to my liking and all is well.
    Incidentally, the AppleScript that mounted the server was essentially "double-clicking" an alias of the server. The Automator action was mounting it based on it's IP address on the network. I'm sure they work about the same way, but the AppleScript still doesn't work in iCal. I think it's because Automator uses magic.

  • How to stop re-popping up old ical alarms, i.e. ical calender is not deletable, but keeps on coming back on screen after 30 secs.

    hi, looks like I have a cache problem,
    in ical I can't remove , delete a calendar. after 30 secs it comes back on screen. same happens with old , passed ical alarms.
    i deleted the ical cache User/library/ical, however did not solve the problem

    >> then I get a completely blue screen.
    That probably means that you're not looking at a bug in Photoshop, but a problem with a driver - and the most likely cause would be your video card driver.
    And sure enough, your video card driver is almost 2 years out of date.
    Please go to NVidia's website and get the latest driver - then follow their directions for installation (so you don't get bits of old driver left over).

  • ICal Alarms are unreliable.  Some show up, some don't.  How to fix?

    My iCal alarms are unreliable.  Some work and some never show up.  I've even copied and pasted an event from one place to another, and on the new date, it didn't work. 

    It depends on the way you told iTunes to sort your music.
    It mostly happens with mp3's from friends, as some software does not put the mp3 tags in as iTunes do, cause there are different mp3-tag versions out there.
    For example, if you choose in iTiunes to sort by Album Name, all songs without a matching entry in the "Album Name" field where sorted to "unknown album" or "build up a different album" if only some "Album Name" entry's are different.
    Also, if no Artist Name is set in the informations, the tracks will get sort to "unknown artist"
    As said before, put all songs from the album in question into a playlist and edit the information to be the same on every track.
    You may also mark all traks from the album at once, right click, choose information and put the correct Album name in the field.
    Lupunus

  • Ical alarms and birthdays...please help

    I am trying to get all of my birthdays to use the same alarm settings. I went in and set up one persons birthday alarm setting but cant figure out how to get all of them to send an alarm without going to each and every birthday listing. I have a "calendar" set up called, Birthdays that they are all listed under. Is there an easy way to do this?

    So, it sounds like I may have been experiencing the same problem as everyone else (general iCal alarm issues). The location of the preferences file you provided is exactly what I was looking for! I deleted the file, created a test event with an alarm a few mins in the future, and BAM! It worked! For the first time in over... a couple years now (?) I actually saw an iCal alarm.
    Possible causes of my error: while i think it may have been upgrades, software bugs, mobileme, etc. it seems one unexplored possibility was when my machine ran out of a charge (batteries) and the date was reset to 1969. I checked the date of the file you mentioned above--crated date was 1969. So, it was cycling through hundreds of alarms since I got my machine (2004).
    In short... THANK YOU FOR POSTING THAT LOCATION OF THAT FILE. I hope I am not speaking prematurely and that this issue does not crop up again. If so, at least I have a decent workaround. Cheers.

Maybe you are looking for

  • How can i get the two values?

    There are two peaks above the threshold in spectrum diagram,I want to get their coordinates,how can I? thanks!

  • Can I use multiple values for a rollup key on the same Endeca record?

    We have a business need to to aggregate our records using different criteria, based on user navigation. We are thinking of using a rollup key with multiple values to help with the aggregation, but we are running into some issues. Here is a made-up xa

  • How to set up for wireless through time capsule

    I have at&t u-verse but I disabled the wireless in u-verse modem and now have forgotten the steps to take to set up my time capsule but to wireless.  I had my time capsule used as wireless router before we moved to a different state but it has been a

  • How do you unlock an disabled ipod?

    How do you unlock an disabled ipod if holding down the home key do not work?

  • Network rendering

    I'm trying to figure out how to submit a network render in AFX on a mac without copying all local files to the watch folder.  In windows I would just add files to my comp using an absolute network path by going to the network/my machine/shared folder