List of names to scheduled email and events

Hi everyone,
honestly, this is my first time using Applescript. But after some research I thought that Applescript offers the nicest way to solve my problem.
For our research group I'd like to set up a tool which automatically sends an email on a given day reminding the people of who is our next speaker. Preferably, the script also adds an event to the group calender.
I already started scripting but got lost in all the help sites and tutorials and commands. I hope you can help me.
So here's the algorithm in laymens terms I'd like the script to perfom:
Execute on a given day every week (variable "reminderDate") (this could probably be done with Automator)
Read in the first two lines of a text file containing all the group members (every member in a new line).Save the first to member names into variables (e.g. "name1" and "name2")
Write new text file with same name as the original one such that the first name of the original file is now cut out and put at the end of the new text file (by this I wanna make sure that the members list is cycled through constantly)
Write an email to specific adress as an announcement (reminder for group members)
Subject: Text + Date some days and hours in the future of "reminderDate" + "name1" + "name2"
the body should also contain the future date and the names and some text and the list of group members
Create an iCal event on the future date with the names "name1" and "name2" as event name.
I know this is asking for quite a lot. But I would be really happy for any input i can get.
The code I already have is:
set membersFile to (open for access (POSIX file "/path/to/groupMembersList.txt") with write permission)
set membersText to (read membersFile for (get eof membersFile))
close access membersFile
-- Store contents in List
set membersList to every paragraph of membersText
set speaker to item 1 of membersList
set chair to item 2 of membersList
-- Put first list element at the end
set newMembersList to rest of membersList & item 1 of membersList
My problem at the moment is no. 3 of the algorithm, i.e. how do I write out the newMembersList to the file s.t. every item is in a new line?
Thank you guys so much!
Cheers,
Pascal

Hi,
pasQualle wrote:
My problem at the moment is no. 3 of the algorithm, i.e. how do I write out the newMembersList to the file s.t. every item is in a new line?
This can be done like this :
set membFile to POSIX file "/path/to/groupMembersList.txt"
try
      set membersFile to open for access membFile with write permission
      set speaker to read membersFile before linefeed -- this read up to linefeed but not including the linefeed character
      set restOfMemb to read membersFile -- read all text from the second line
      set chair to paragraph 1 of restOfMemb
      write restOfMemb & linefeed & speaker to membersFile starting at 0
      close access membersFile
on error
      close access membFile
end try
If the end of lines in your text file is not a linefeed character (Unix newline) then replace linefeed in this script by return
pasQualle wrote:
Execute on a given day every week (variable "reminderDate") (this could probably be done with Automator)
You can create an iCal event at specific day (repeat :each week, alarm: run an AppleScript  or run an Application (this script saved as Application))
pasQualle wrote:
Write an email to specific adress as an announcement (reminder for group members)
Subject: Text + Date some days and hours in the future of "reminderDate" + "name1" + "name2"
the body should also contain the future date and the names and some text and the list of group members
Create an iCal event on the future date with the names "name1" and "name2" as event name.
There are several examples on this site and on the internet for those parts of the script to starting
You can post one part or both parts, if it doesn't work.

Similar Messages

  • HT5624 I need help changing my account password I know the pass word but its asking me to answer two questions I don't have the answers to. and it gives an Email account to send help to but the Email listed was an old work Email and I no longer have acces

    I am trying to change my apple pass word? I know my Password but when I am trying to change it, it asks for me to answer 2 questions and I have no idea what I put as the answer? there is a button for sending out an Email to help but the Email listed is an old work account and is no longer in use. Can some one help me either change the password or change the old Email address to one that is use?

    You need to contact Apple. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (90031)

  • Where can I find a list of names for each component and functions for each component?

    I have a test I need to study for, and we used this program in class during our labs. Is there any place I can find the names of the components and definitions of their exact functions? Thanks.
    If not I'll post pictures of the VI's we created, hopefully this is a simple question though.

    Try the context help.  When you move the cursor over each item, the help window will show a brief description and in most cases a link to detailed help.  It is generally useful to keep context help turned on while programming.
    Lynn

  • How to create schedule job and event trigger in XI to start a ABAP program?

    Dear All:
    Here are what i need to do:
    1.To run a ABAP program to start an XI scenario per hour.
    2.To run a ABAP program to start an XI scenario per day at 6 PM.
    3.To run a ABAP program used event trigger to make sure that XI scenario has finished the process and after that wait for 10 min later and run again.
    only i know is used sm36 & sm37 to set up a schedule job.
    but what i don't know is how to do it step by step.
    especially point 3.
    are there any step by step example can show me how?
    it better be simple and details...
    thanks you all
    Regards
    Jack Lee

    Hi,
    If you want to trigger the event manually from within SAP, use transaction
    SM64
    in SAP this is done by scheduling a job
    once a new customer is entered
    your scheduled report sends customer master data
    you can schedule your report (TCODE - BD12 I think) to one day or every 5 minutes... it depend on your needs and the system performence
    Regards,
    Surya

  • Iphoto emailing and "events" issue

    I am not sure if these issues are related.  2 weeks ago I began having and issue where 3 of my events had no key image.  It also said there were 0 photos in the event.  If you clicked on the event, you could still see there were photos in there.  I did a little research and discovered that I may have caused this when I emptied iPhotos trash recently.  I didn't know this had to be done and there were several thousand photos in there.  Since then I have also updated to Yosemite.  I have now noticed that I cannot email photos from iPhoto anymore.  I can go through all the steps but after I hit send, the wait bar goes to the end and nothing happens.  I let it sit overnight once and it was still waiting.  I assume these issues are related to either me emptying the trash or updating to Yosemite.  Anyone have any ideas how fix this?  I am using OSX 10.10.2 and iPhoto 9.6.

    Go into iPhoto's Accounts preference pane and delete the email account that's there.  Then add it back and try to email again.
    A better solution, IMO, is to set Mail as iPhoto's email client in iPhoto's General preference pane.  That allows you better access to Contacts, a sent copy created automatically and also has templates in the stationary section similar to iPhoto's.  Mail is also more reliable.

  • How to find the name of the block and yours items at runtime

    Hi, everybody.
    I wonder if there is any way to list the name of a block and their respective items that forms at run time. for example, using a loop in wnfi.
    Since already thank you.
    Sorry for my bad English.

    Hi,
    Try this code. It will travel through all block's items.
    DECLARE
         Str_First_Block      VARCHAR2(100) := NULL;
         Str_First_Item          VARCHAR2(100) := NULL;
         Str_Current_Block VARCHAR2(100) := NULL;
         Str_Current_Item      VARCHAR2(100) := NULL;
    BEGIN
         Str_First_Block := :SYSTEM.CURRENT_BLOCK;
         LOOP
              IF Str_Current_Block IS NULL THEN
                   Str_Current_Block := Str_First_Block;
              END IF;
              Str_First_Item := GET_BLOCK_PROPERTY(Str_Current_Block, FIRST_ITEM);
              LOOP
                   IF Str_Current_Item IS NULL THEN
                        Str_Current_Item := Str_First_Item;
                   END IF;
                   MESSAGE('Item - ' || Str_Current_Block || '.' || Str_Current_Item);
                   PAUSE;
                   Str_Current_Item := GET_ITEM_PROPERTY(Str_Current_Block || '.' || Str_Current_Item, NEXTITEM);
                   EXIT WHEN Str_Current_Item IS NULL;
              END LOOP;
              Str_Current_Block := GET_BLOCK_PROPERTY(Str_Current_Block, NEXTBLOCK);
              EXIT WHEN Str_Current_Block IS NULL;
         END LOOP;
    END;Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • Hi Apple support, my name is Derek Turner and I have been hacked through a friend's email account and I wish to know if 1. I can clean my email list of names and account with software and 2. How is it possible to delete emails that are still coming back

    Hi! My name is Derek Turner and I have been hacked through a friend's email message to me which I opened unsuspecting any danger.  Initially, he sent me an 'attention' or warning email with a link which I tried to open but it could not be opened, so I left it not knowing what it was all about at the time.  Later, I received another email from him (probably the hacker) and opened a 'not very pleasant' web site.  It did not twig with me at the time as I am a bit new to this type of thing but when I mentioned it to my wife she immediately said that I had been 'hacked'.  By this time it was too late, and it infected all my email addresses!  I would be grateful if you may know if there is software that I can use to clean up my email account and if there is anything for iPad minis that can prevent this happening in future? (Malware, Firewall?).  I am also getting emails back that relate to the hacker and I cannot 'delete' them from my iPad, only on my PC!  Any suggestions?
    Thank you for your time regarding this matter,
    Derek Turner,( a very new iPad mini user!)

    Hi,
    I don't think that can be solved by any advice the regular posters could post here.
    I would go back to Apple and explain the situation (again).
    I would also consider closing the account (Apple rarely seem to do this as accounts are never deleted but just closed).
    I understand this may cause issues for things purchased in iTunes and the App Store which my include Restoring the OS at some point.
    8:20 pm      Tuesday; September 16, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Unable to schedule a report to email and print

    I have been working on a task to both print and email a report to recipients whose email addresses are obtained at runtime.  So far I am able to email the report as a PDF attachment, however, I am not able to get the report to print.  I have three thoughts as to why the report is not printing.
    1. The printer is in a subdomain under the domain where InfoView and the Enterprise server reside.
    2. It is not possible to schedule a report for both an SMTP and print destination simultaneously.
    3. The format is causing an issue in printing - the SDK API states "Printer is a report format specific destination and can only be used when the report object is a Crystal Report."
    I have looked at the scheduled report in InfoView and can see that the print settings I am passing are correctly set for the scheduled instance.  Does anyone know if there is a problem with trying to schedule printing and email at the same time, or if the report format must be .rpt?
    Below is my code. Thank you for your time.
    String query = "Select SI_ID, SI_NAME, SI_PROCESSINFO, SI_SCHEDULEINFO, SI_SCHEDULE_STATUS From CI_INFOOBJECTS Where SI_ID=" + reportId;
            IInfoObjects results = null;
            ISchedulingInfo schedulingInfo = null;
            try {       
               results = iStore.query(query);           
            } catch( SDKException sdke ){
               logger.error(sdke);
            if( !results.isEmpty() ){
                // get the actual report object from collection and set scheduling information
                IInfoObject report = (IInfoObject)results.get(0);
                schedulingInfo = report.getSchedulingInfo();
                schedulingInfo.setType(CeScheduleType.ONCE);
                schedulingInfo.setRightNow(true);
                schedulingInfo.setRetriesAllowed(3);           
                try {
                    Set<String> keys = destinations.keySet();
                    Iterator i = keys.iterator();
                    while( i.hasNext() ){
                        String dest = (String) i.next();
                        if(dest.equals(CrystalDestinations.EMAIL)){
                            // get the destination object and set it to SMTP plugin
                            List emailAddress = destinations.get(CrystalDestinations.EMAIL);
                            IDestination destinationObject = schedulingInfo.getDestination();
                            destinationObject.setName("CrystalEnterprise.SMTP");    
                            IDestinationPlugin smtpPlugin = (IDestinationPlugin) iStore.query("SELECT * FROM CI_SYSTEMOBJECTS WHERE SI_PARENTID = 29 AND SI_NAME='CrystalEnterprise.SMTP'").get(0);
                            ISMTPOptions smtpOptions = (ISMTPOptions) smtpPlugin.getScheduleOptions();
                            smtpOptions.setDomainName( emailDomain );
                            smtpOptions.setServerName( smtpHost );
                            smtpOptions.setSMTPUserName( smtpUser );
                            smtpOptions.setSMTPPassword( smtpPass );
                            smtpOptions.setSubject( "Email for report " + report.getTitle() );
                            smtpOptions.setMessage( "This is the message body" );
                            smtpOptions.setSenderAddress( smtpUser + "@cdrh.fda.gov" );
                            smtpOptions.setSMTPAuthenticationType( ISMTPOptions.CeSMTPAuthentication.LOGIN );
                            for(int j = 0; j < emailAddress.size(); j++ ){
                                smtpOptions.getToAddresses().add( emailAddress.get(j) );
                            destinationObject.setFromPlugin( smtpPlugin );                                                                               
    } else if ( dest.equals(CrystalDestinations.PRINT) ){
                            List printers = destinations.get( CrystalDestinations.PRINT );                   
                            IReportPrinterOptions printerOptions = ((IReport)report).getReportPrinterOptions();
                            printerOptions.setCopies(1);
                            printerOptions.setEnabled(false);
                            printerOptions.setPrinterName( (String)printers.get(0) );                   
                            printerOptions.setPageLayout(IReportPrinterOptions.CeReportLayout.USE_SPECIFIED_PRINTER_SETTING);
                    List reportPrompts = ((IReport)report).getReportParameters();
                    for(int j = 0; j < reportPrompts.size(); j++){
                        IReportParameter prompt = (IReportParameter) reportPrompts.get(j);                   
                        if(prompt.getParameterName().equals(mdrParamName)){
                          IReportParameterSingleValue v = prompt.getCurrentValues().addSingleValue();
                          v.setValue(reportParameters.get(mdrParamName));
                        } else if(prompt.getParameterName().equals(addressParamName)){
                            IReportParameterSingleValue v = prompt.getCurrentValues().addSingleValue();
                            v.setValue(reportParameters.get(addressParamName)); 
                    IReportFormatOptions format = ( (IReport) report).getReportFormatOptions();
                    format.setFormat(IReportFormatOptions.CeReportFormat.PDF);
                    iStore.schedule( results );

    Hi Jason,
    Based on your code, I could not tell if you were scheduling a Crystal Report or a WebI document.
    Regardless, what I would suggest is you try scheduling the report/document on InfoView.
    Once you schedule it on InfoView, you can retrieve the instance on Query Builder (or through code) and compare the properties that are being set through InfoView and the one you set through your code.
    This should indicate if you are missing some properies or have set some properties incorrectly.
    Hope this helps.
    Regards,
    Dan

  • Email and Phone number added to contact list without permission?

    Just discovered an email and phone number added to my contact list under my name and its not mine! How did this happen? Can't call Apple because my 90 days has expired and they won't answer the question without me paying!! So frustrating!! Hoping someone has an answer for me??

    What is the full message of the notification ? If your phone number and email address were added to, for example, the Messages app on another device then you will need to go to that other device to remove them from it

  • I lost my address book when I installed Mountain Lion and have not been able to recover it.  WHen I type in a name in an email the address shows up, so I know it is in there.  How can I restore my address book?

    I don't know how to do this.  I typed the question in the bar above, but apparently need to type it again here.  I lost my entire address book when I installed Mountain Lion and have been unable to recover it.  I know the information is in there as when I type in someone's name in an email the address always shows up right away.  How can I find the information for my contacts and restore my address book? Do I need to go to the Apple Store that is 2 hours away and have an expert help me or can I find out how to do it online for free myself?

    The auto-complete in Mail addresses comes from two sources: (1) The "Previous Recipients" list, which can be viewed via Mail > Window > Previous Recipients. (2) Your Address Book (now called "Contacts").
    If you did in fact lose your Address Book - are you sure you don't have "Contacts" in your Applications Folder? - It sounds like you are getting addresses from source (1).  If you did in fact lose your  Address Book (now called "Contacts" !!), you will have to restore it from a backup.
    charlie

  • I open a pdf file with club members names and emails. I used to be able to click on the members email and a outlook box would appear with the email address .

    I have a list of names and email addresses (250) and in a previous version of firefox I would go on the web page and when I would place the curser over the members email address and click it would automatically bring up an Outlook email to send box with the members email address already listed and ready for me to enter any information. This new firefox version (19) just lets the curser go across the email address and nothing happens when I click. How do I get the previous feature back?

    Current Firefox versions have enabled a new build-in PDF Viewer and that viewer doesn't have all the features that the Adobe Reader has.
    You can change the action for Portable Document Format (PDF) from Preview in Firefox to use the Adobe Reader or set to Always Ask.
    *https://support.mozilla.org/kb/change-firefox-behavior-when-open-file
    You can set the pdfjs.disabled pref to true on the <b>about:config</b> page to completely disable the build-in PDF viewer and use the Adobe Reader instead.
    See also:
    *https://support.mozilla.org/kb/view-pdf-files-firefox-without-downloading-them

  • Using GREP to bold Date and Event Name

    Hi
    I am stumped at how to properly apply a bold style to a combination of dates and event names using GREP. I am including three examples below. I do have Paragraph and Characters styles set up. The area I would like to effect the change is in all caps. I am trying to add a bold style only to the dates and the title of the event with out changing the rest of the information.
    I started of with this GREP Style:
    \d{1,2}\/\d{1,2}|\d\-?\s|\u
    It is bolding the dates and the name of the event. But it's not bolding the small dash between events that have a beginning and end dates or the en dash. It is randomly bolding other numbers and capital letters that it should not. Very frustrating. Each time I alter the GREP Style above, it makes it worse. This is as close as I got to the desired effect. Any ideas how to fix this?
    12/6-8 — HEALING WEEKEND AT TRUE NORTH HOLISTIC CENTER.  Friday  11am-5pm. Private Integrated Healing sessions, Friday 6:30pm-Sunday noon. “Blue Christmas” Retreat: Coping with Sadness at the Holidays; Sunday 3-7pm. Public Integrated Reiki™ clinic. Hubbardston, MA  www.truenorthholisticcenter.org. (978) 820-1139.
    12/6-12/8 — READ AND PLAY MUSIC IN A WEEKEND! World famous seminars turns beginners into musicians, revitalizes and inspires even pro musicians. 169 Mass Ave, Boston. (781) 599-1476 or http://signup.understandingofmusic.com or [email protected]
    12/7 — REIKI CERTIFICATION. Wilton, NH. Libby Barnett, MSW. 32 years experience. Reiki Energy Medicine author. Notebook, pin, certificate awarded. Credit cards accepted. CEU’s/contact hours. Call (603) 654-2787 or www.reikienergy.com. Reiki II: 12/8

    Thanks! That works. I am using a paragraph style for the body and have a bold character style for the information that needs to be bolded. I notice there are some listings that uses a colon and the bolding continued into the description where the first period appears (see samples below). I added a colon (to the shorter GREP style you suggested) in addition to the perod and excalamation point to search for.. Now the bolding stops at the colon but does not include up to the word "CARRY" (see first example). The second example, the bolding should stop after "FAIRE" but cotinues to the word Wisdom because of the period.
    I wish there was a option in the GREP drop menu to search for All Caps only and not Any Uppercase Letter. Is it a case were I need to manually edit those instances so it conforms to the norm? Or is there away to modify the GREP expression ^.+?[.!] to also include other instance like the example below?
    I alread try to add an additional rule using the Postive Look Ahead and nothing. And using the Any Uppercase Letter option, either forces the text back to the begining looking unstylized or it forces any capital letters to be bolded.
    12/8-12/13 — WESTERN REIKI MASTERS: BE ATTUNED TO CARRY Japan’s Gendai Reiki lineage: Usui Mikao-Kan’Ichi Taketomi-Kimiko Koyama-Hiroshi Doi-Audrey Pearson. Learn to teach all 4 levels of Japan’s Gendai Reiki Ho. www.yogapathways.com. (508) 740-9870 or Facebook: ‘Gendai Reiki America’
    11/23 — PSYCHIC AND HOLISTIC FAIRE at Women of Wisdom. North Easton, MA. Psychics, angel readings, mediums, crystal healings, Gaiadon Heart, chair massage, Reiki and more! Sign yourself up for a few appointments and bring your friends! www.womenofwisdominc.com (508) 230-3680.

  • Email workflow showing domain and alias and not the name in the email

    I created an email workflow for a specific user field value to receive an email on a trigger event.
    However, the email received shows the DOMAIN/Alias and not the "Name" in the email content.
    How to correct this error? Not sure where is the issue is.
    Sample:
    Hello [%Current Item: Reviewer%] is the greeting line.
    If Reviewer is say Domain A/v-abcd and Name is Abcd.
    The email reads
    "Hello Domain A/v-abcd" and not "Hello Abcd"

    Hi,
    Just select "Display Name" instead of "Login Name" in the "Return field as" field of Lookup dialog.
    It should help.
    Regards Michael (http://sp2013-blog.com)
    Please, don't forget to upvote and mark as an answer if appropriate

  • [svn:osmf:] 13083: Updated MASTAdapter class with new trait names and events.

    Revision: 13083
    Revision: 13083
    Author:   [email protected]
    Date:     2009-12-17 16:10:05 -0800 (Thu, 17 Dec 2009)
    Log Message:
    Updated MASTAdapter class with new trait names and events.
    Modified Paths:
        osmf/trunk/plugins/MASTPlugin/org/osmf/mast/adapter/MASTAdapter.as
        osmf/trunk/plugins/MASTPluginIntegrationTest/src/org/osmf/test/mast/TestMASTPluginInfo.as
        osmf/trunk/plugins/MASTPluginIntegrationTest/src/org/osmf/test/mast/adapter/TestMASTAdapt er.as

    Silviu!
    I'm really sorry, but as all the office is trying to fix the problem, someone replaced the url content with the stuff that was pointing to the local machine.
    I've fix it, and the video player is available here again: http://pp.player.webtv.flumotion.com/params/apiKey/5PzLR2ULL3z2rumJ/videoId/60
    If there are other references to the localhost, please do not bother with them, as they do not affect player functionality.
    The stream that it uses is an RTMPE, so i'm afraid it will only works with this player. Anyway, the stream url is as follows: rtmpe://87.248.205.81/a4349/e2/veo7/ondemandrtmpe/mp4/med/first-person-mario-4d8741aa.mp4
    I really appreciate your help!
    Thank you!

  • [svn:fx-trunk] 8271: Change the event type of List-based component's change , changing and caretChange events to a new event class: spark.events. IndexChangeEvent.

    Revision: 8271
    Author:   [email protected]
    Date:     2009-06-25 16:25:28 -0700 (Thu, 25 Jun 2009)
    Log Message:
    Change the event type of List-based component's change, changing and caretChange events to a new event class: spark.events.IndexChangeEvent.
    QA: Yes
    Doc: Yes
    Checkintests: Pass
    Mustella: List/DDL/ButtonBar tests pass
    Reviewers: Hans & Jason
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/events/IndexChangedEvent.as
        flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/ButtonBarE xample.mxml
        flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/DropDownLi stExample.mxml
        flex/sdk/trunk/frameworks/projects/spark/asdoc/en_US/spark/components/examples/ListExampl e.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
    Added Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/events/IndexChangeEvent.as

    Are those components in a SWC?  I would expect them to also have a namespace
    that looks more like http://.....
    Otherwise, make sure the path to the components are correct.

Maybe you are looking for