Add applescript date/time output to Automator email Subject

I'm having a big issue with this new forum format (which is awful IMHO) but thats not my problem at hand...
My problem is getting the output of an AppleScript to show the correct time in a Lion (+latest patches) new Mail subject line.
This is the "Run AppleScript" action (working fine)
on run {input, parameters}
          set FutureDate to (current date) + (6 * days)
          set FutureDate2 to date "11:00:00" of FutureDate
          return FutureDate2
end run
This is "View Results" action (output as expected - during testing),
{date "Saturday, 1 September 2012 11:00:00"}
The "Set Value of Variable" action (has been set to, without marks),
Variable: <NextSaturday>
This is "View Results" Action output (still looking good - during testing),
{date "Saturday, 1 September 2012 11:00:00"}
And in the "New Mail Message" action (the rest of email not shown),
Subject = <NextSaturday> @ The Park
This should deliver a nice output in the actual new Mail message, however the Subject line time is now incorrectly shown....
Subject = 2012-09-01 10:00:00 +0000 @ The Park
I have tried this without the second "View Results" Action (part of fault finding) yet still have the same problem. Sending with the <Current time> Variable works correctly, meaning it probably has something to do with the Date/Time preferences in Lion; located in the UK but on BST at the moment.
Maybe I am missing something but after quite a bit of reading this should be possible, but I cannot understand how to overcome this issue.
All help gratefully receieved.

It does look like an issue with coercing an AppleScript date object to an ISO date string - you can just coerce the date to text in your Run AppleScript action.  The way you set the time gives an error on my machine (note that as of AppleScript 2.1, a date string must exactly match one of the system date formats), it should be something like:
          set FutureDate to (current date) + (6 * days)
          set time of FutureDate to (11 * hours)
          return FutureDate as text

Similar Messages

  • How to send the ALV report output by automated email.

    Hi All,
    Can any one advice how to send ALV report output by automated email.
    Thanks in advance.
    Vikram.
    Edited by: vikram mallavaram. on Oct 13, 2011 3:26 PM
    Moderator message: FAQ, please search for previous discussions of this topic.
    Edited by: Thomas Zloch on Oct 13, 2011 3:27 PM

    Hi Ramya,
    Check the links below :
    http://wiki.sdn.sap.com/wiki/display/Snippets/Sending+Mail
    http://wiki.sdn.sap.com/wiki/display/Snippets/AbapEMAILProgram
    http://wiki.sdn.sap.com/wiki/display/ABAP/SendMessagetoExternalemailidandSAPUseridvia+ABAP
    They will explain you to send an email.
    Regards,
    Kittu

  • TS4079 Why when I ask Siri to remind me does it not allow me to add a date/time to the reminder?

    I have recently started getting problems with my Siri. when I ask it to remind me, it takes the details but then doesn't allow me to add a date or time. It used to do that but no longer. What's the point in having a reminder that can't remind you?

    Toyita wrote:
    I have put the relationships of my closer friends and family to be used when making phone calls.  When I ask Siri to say "call my husband" for instance, it answers me "My name" I am not permitted to do so... Why is that? What am I doing wrong?  Location services are on, and it works with anything else.  I need it most for phone calls.  Please help.  I am using an iPhone5
    If my previous tip had not worked, the alternative is to make sure FaceTime is enabled under Settings > General > Restrictions. If Restrictions are Enabled, FaceTime must be toggled to ON.

  • How can I make the current date/time be sent when emailing as XML?

    I'm creating a form for a customer to use for submitting print jobs. This customer will be emailing the XML form data, which will in turn be converted into a production order. I'd like to make the PDF form capture my customer's system time, so that I know when they filled out the form. I COULD just leave that up up the customer and use required current date and time fields, but that provides the ability for the customer to falsify that information.
    Is there any good way to capture the current date/time in the XML data, so that the customer doesn't need to nor has the ability to?
    Any suggestions would be great!

    You can use the following methods getHours(),getMinutes(), and getSeconds() from the date object to obtain the values for hour,minute,and second.
    Click here to see an example:
    http://66.34.186.88/LiveCycleSamples/.3bbc2f4b.pdf

  • TS4268 Updated iphone 4S with IOS6, now facetime and imessage won't work, says "waiting for activation", have reset, turned off and on, removed sim card, checked date/time, checked restrictions, checked email/ID, tried all troubleshooting advice on apple

    Updated iphone 4S with IOS 6, now facetime & imessage won't work, says "waiting for activation", have reset, turned off & on, removed sim card, checked restrictions, email/ID, date/time, tried all troubleshooting advice on apple support.  HELP!!!!

    Updated iphone 4S with IOS 6, now facetime & imessage won't work, says "waiting for activation", have reset, turned off & on, removed sim card, checked restrictions, email/ID, date/time, tried all troubleshooting advice on apple support.  HELP!!!!

  • How do you add a date/time stamp to photo before printing?

    How do you customize a photo?  I want to add a date to a photo before printing.

    Some Image Editors That Support layers:
    Photoshop Elements 11 for Mac - $79
    GraphicConverter - $40
    Rainbow Painter - $30
    Imagerie - $38
    Acorn - $50
    Pixelmator - $60 
    Seashore - Free
    GIMP for Mac - Free
    Xee 2.1 - free
    OT

  • Add current Date/Time to a database note?

    If we set the database note when we are loading the cube, what would be the syntax to set the current date/time?<BR><BR>For example...<BR><BR>ALTER DATABASE <NAME> SET NOTE <COMMENT><BR><BR>What would go in <COMMENT> in order to set current date/time?<BR><BR>Cheers!

    Hi Philip,
    There is an SAP formula variable to supply the current date in a formula. I think it is 0F_ADAY...install it from business content if you cannot see it in the query designer (formula box, under formula variables) and try using it.
    Hope this helps...

  • Please add a date/time stamp to each entry in the list of sites with accepted/blocked cookies.

    It would make it easier to find which site it is that I just blocked, that now prevents me from loading the page. (ConOps: Go to list. Sort by date/time. Delete all entries from the past few minutes.)

    You can see all permissions including for cookies for the current tab on the "Tools > Page Info > Permissions" window.

  • How can I change Date/Time output?

    I was wondering if someone could help with the following
    issue:
    I have a form to insert data into a database. I also have a
    form that displays the data and allows you to update (change or
    modify) the data. The problem is my Date/Time field. Instead of
    displaying the data as it should in this format:
    3/23/2007
    It instead displays the data in the following format
    2007-03-23 00:00:00.0
    So no matter what you would like to modify or change, you
    have to change the date back to the correct format or you will
    receive an error message. This is obviously a pain.
    Is there a way I can change the way this particular data is
    displayed from the database?
    Within my access database I have formatted the time correctly
    and it displays the info correctly, not sure how to do it in
    Dreamweaver. I’m using ColdFusion as my programming platform.

    Nevermind, I just figured it out =)

  • Add Curent Date & Time to PDF when Printed

    This is my first post so please excuse any ignorance.
    Basically we are in the process of creating electronic copies of SOP’s and putting them on our file server for all staff to access. Due to regulations, when these SOP’s are printed they would need to have the current date and time in which the SOP was printed, ideally like a watermark faded diagonally across the page but even if it was something on the bottom or top this would also do the trick.
    It should read "Only Valid on Date of Printing - <Current Date><Current Time>
    Could somebody please tell me if something like this is possible by incorporating JavaScript into the PDF.
    Any assistance I would be grateful.
    Thanks.
    Keith.

    GKaiseril
    Thank you so much, I got it and it worked perfect courtesy of "hardDriver2". For anybody else who is looking to do this see below.
    // Description: This script adds a text field to the left side of all
    // pages. It also sets a doc level JavaScript that executes when the
    // document is printed and fills the field with date.
    // Add field to each page of form
    var inch = 72;
    for (var p = 0; p < this.numPages; p++) {
        // create rectangle quads for field
        var aRect = this.getPageBox( {nPage: p} );
        aRect[0] = 0.0;
        aRect[1] = 0.0;
        aRect[2] = 26.0;
        aRect[3] = 792;
        // now construct text field to fill with date information
        var f = this.addField("PrintField", "text", p, aRect )
        f.delay = true;
        f.textSize = 16;
        f.textFont = font.HelvB;
        f.textColor = color.black;
        f.alignment = "center";
        f.readonly = true;
        f.print = true;
        f.hidden = true;
        f.delay = false;
    for (var p = 0; p < this.numPages; p++) {
        // rotate the text 
        var f = this.getField("PrintField." + p)
        f.rotation = 90;
    // Adds a doc level script to populate text field when doc prints from
    // Acrobat or the free Adobe Reader. Note: the '\r' character represents a
    // carriage return.
    var myWillPrintScript = 'var f = this.getField("PrintField"); \r' + 'f.hidden = false; \r' + 'var d = new Date(); \r' + 'var year = d.getYear()+1900; \r' + 'f.value = "THIS DOCUMENT ONLY EFFECTIVE ON " + (d.getMonth()+1) + "/" + d.getDate() + "/" + year; \r'
    var myDidPrintScript = 'var f = this.getField("PrintField"); \r'
                               + 'f.value = ""; \r'
                               + 'f.hidden = true; \r'
    // Now set the scripts to execute on the Will/Did Print events.
    this.setAction("WillPrint", myWillPrintScript);
    this.setAction("DidPrint", myDidPrintScript);

  • Submit Button Automated Email subject selection

    Hi
    I've generated a new form and added a submit button, I've managed to bumble my way through adding the mailto: javascript but it would be very benaficial if I could define the subject feild from on of the form text boxes.
    Is this possible?
    Thanks in advance
    James

    This is currently outside the scope of the Formscentral product. If you want this type of functionality I suggest you switch to a Formscentral based submission workflow instead of an email submission based one.
    Andrew Yarborough

  • Can Mail add the date of an email and a link to the email in Address Book?

    I seem to remember back in the days when I used Entourage, that there was a feature that allowed me to have the email program add a date and link to the email in the address book file for the email recipient. Is there a script or anything that would allow that automation?
    I would like to be able to open a persons address book file and see all of the emails I sent to that person in Address Book. I know I could do a search in Mail for that address, but it would be sweet if I could have a record of all the emails sent to a given person with a link to each email directly from within Address Book.
    Am I crazy or is this something others would like? Or, am I missing a little box somewhere that I need to click somewhere?...

    What you're wanting is not a feature in any mail client, so I wouldn't hold your breath waiting for it to appear in Mail, or Address Book.
    If you want to keep track of all the emails sent to or from a particular person, you'd need to create Smart Mailboxes for all of them and rules to route Sent mail from each person's address to those respective mailboxes. If that's too much work for you, you can still do a search by name in Mail and select whether you're looking for mail sent From, or To that person and all of them will appear, except any you may have deleted.
    Mulder

  • How to add date/time stamp to PDF in Acrobat 9 Pro?

    Hello,
    I'd like to add a date/time stamp to a PDF so that when I print the document, the current date/time will be printed as well.  Is it possible to do this?  I found the following posting (http://forums.adobe.com/thread/502915), but am not able to get it to work for me.  I don't really know anything about using Javascript.  Any help would be much appreciated.
    Thanks!

    Not sure it will work, but you can try using the app.hideMenuItem() method. See reference here.

  • How to get replied date & time of an email

    I am using MS outlook 2010 from this month (August 2014), So i work on so many emails from different persons and I want to see time taken to on each email from the time I recieved it till the time I replied. Once I get a column with replied time details;
    I can export it to excel so as to report to my manager about my TaT (turn around time), I am new to this forum and this is my first post, please help thanks. (I have browsed here for the same but couldn't get what I need)

    Hi,
    Several suggestions to find the replied date & time:
    1. We can find related emails in Outlook, then find the replied date & time from the related emails:
    Right click on the message in the list, Select "Find Related" -> "Messages in This Conversation" from the menu that comes up.
    2. View tab -> Conversations -> check "Show as conversations", then we can easily find other emails in the conversation, then find the replied date & time.
    Anyway, both methods above are manual and based on your request description, I don't think the whole process can be performed with the build-in feature automatically. However, the whole process may be realized via VBA, if you can accept a VBA method, I suggest
    you post the detailed request in Outlook for Developers forum:
    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • BB off for a few days -- When turn on reconciled emails all show one date/time.

    If I am away for a few days -- with the Blackberry off -- Then when I return and turn on the unit, it will reconcile email through my work blackberry server.  The emails that get downloaded at that time all show on my blackberry email listing as received at one time -- when the reconciliation occurred -- not the dates/times that the actual emails were written.  My work email (on my computer at work) will show the dates/times that the actual emails were written -- even though I also had been logged out from my work email for the time I was away.  This is a real pain for viewing / looking through and finding emails later on the device.  So now, I have to leave the unit on and plugged into the wall when away -- so my emails will show the right date/time on the device.  Is there a way to set things up so I don't have to resort to this? -- seems to me that there must be -- otherwise a lot more people would raise this concern.
    Thanks,

    The last time I checked the incoming emails will always go by the date/time on the device itself. There is not a way to change this behavior.
    Do you turn it off to conserve battery power? If so you can always place the device in Standby mode. The battery drains much slower in this mode and should last anywhere from 10-15 days.
    If someone has been helpful please consider giving them kudos by clicking the star to the left of their post.
    Remember to resolve your thread by clicking Accepted Solution.

Maybe you are looking for

  • How do i set up a new email account

    I'm trying to set up a new email account. When I open preferences/new account, and put in my name, a new email address and password, my mail program just turns on the beachball and says it's not responding. Not sure what to do.

  • Phone not being detected on laptop

    hi , well my phone is not being detected, i made assure that the usb cable is alright, usb port is not 3.0 and is fine good and is among working ports, after trying so much i changed pc , cable but the phone still remains same undetected, wherein if

  • Raw files loosing saturation & exposure upon import on nikon d4s & d7100 my d800 is fine

    I am having trouble with lightroom 5.6 . my Nikon d4s & d7100 raw files loose saturation & exposure upon import my d800 is fine

  • System Administration

    Dear Friends, I would like to know the pre-installation process for a new branch of any office let's say a college, what are the parameters and requirement do i need to fullfill before to set up the network and which CLASS ip should i use etc. Please

  • Synchronization trouble with SyncServer

    Hi, I hope that this is the correct topic for my problem. Whenever synchronizing my iPhone 3G or iPod Touch, the system takes at least 2 hours (might be more, this is the longest I have let it try) syncing calendars or in some cases contacts. Both th