Setting "Date Received" sort order via Applescript?

For my 86-year-old Mom, I want to create an applescript that will always ensure upon launch that her Apple Mail's inbox is always the selected mailbox, and that the sort order is set to Date Received with the newest email at the top. (I'm assuming that would be Descending?) She keeps clicking on the column heads by accident which messes up the inbox's sort order -- and then she doesn't know what to do to correct it. (Well, I've shown her, but her memory isn't such that she can remember it tomorrow after drilling her on it today.)
I found a way to make sure the sort order is by "Date Received" but I haven't been able to determine if I can ensure the sort order or not.
Any help would be greatly appreciated!
Message was edited by: BrianJohns

Dimaxum,
Thanks for your thoughts and the link. I've been there and boy, if there's a solution in there I haven't found it yet! Lots to look at.
I would love to be able to freeze the UI settings in Mail and prevent Mom from messing up the sort order. Haven't figured out how to do that or even if it's possible. Short of that I'm thinking that running an Applescript to correct anything that might have been changed last time she was in the Mail application is the best I can do. I have the Applescript set to run at login, and it takes care of launching Mail when she boots up her computer. I also need to reset the position of the mail window on her screen and the size of the window and whether or not the preview pane is showing. If she accidentally resizes her window, or gets it off the screen, or loses the preview pane -- she's totally lost.
I've found Applescript examples that let me perform a menu action, but there's nothing to check the state of "toggle" items -- for example, command-1 both closes and opens the Activity window. I'd like for it to only make sure that Activity window is open. Mom keeps closing it and then she wonders where it went.
I could do all this stuff "back in the day" with QuicKeys. I'm thinking I should be able to do it with Applescript -- but I've never found Applescript (or automator) to be as understandable and usable as the old QuicKeys was. I do OK with Applescript as long as I can find an example -- but coming up with syntax and stuff like that out of the blue requires more experience with it than I'll ever have.
I just looked up the price for QuicKeys. $60 -- wow, I'd love to have it again but that's just too pricey for this single application.
Any more ideas or pointers, anyone??
Message was edited by: BrianJohns

Similar Messages

  • Toggle Finder sort order with AppleScript under Lion 10.7?

    For years I've been using this AppleScript to toggle the sort order of a Finder window:
    if sort direction of column id size column of list view options of window 1 is normal then
        set sort direction of column id size column of list view options of window 1 to reversed
    else
        set sort direction of column id size column of list view options of window 1 to normal
    end if
    (You can replace size with kind, name, modification date, etc.)
    But ever since Lion, this no longer works!
    The little arrow in the column header DOES change, but the items do not re-sort.
    Any way to get this working?

    Why not just click on the columns?

  • Can I set up Receivables in order to overapply a receipt?

    I was wondering if is possible to set up Receivables somehow in order to be able to overapply a receipt?
    Example: A receipt is for $100.
    An invoice is for $200.
    I would like to be able to apply the amount and have a negative amount (-100) in the field Unapplied amount in Receipts Application screen.
    If anyone has experience in this area, please help!
    I would appreciate it.
    Thank you,
    Tina.

    Hi ,
    In the example mentioned , The Invoice Amount is 200 and Receipt Amount is 100.
    That being the case the amount due on the invoice will be 100(+) .To see the effect
    of Allow Over Application option The Transaction Amount should be lesser than the
    receipt amount.
    Regards,
    Jaikrishnan

  • "Date Added" sort order problem when importing folders

    I sort by "Date Added" to view my iTunes library, and use the middle "view" button to view tracks grouped as albums with artwork. This works mighty well except when I'm importing folders containing the files in an album, such as those I get from eMusic--the tracks are displayed out of order when I do this. The only solution I've found so far is to import one track at a time. Any ideas how I can get those tracks in there in the right order when importing a folder? Any scripts hanging around that will do it right? Thanks to all....

    What sort order do you have selecting in the sort drop-down?  There is no "correct" sort order.  You can sort on any metadata you can show in the Browser.  The sort drop-down is located in the top border of the Browser, near the left corner.  Every container in Aperture retains the sort order it last had.  When you manually move an Image in the Browser, the sort order is changed to "Manual".

  • How to change Finder View Arrange Date Created sort order

    When yoo go to a list of photos in a file under Finder, they can be sorted in different ways, but the most common one for me is by Date Created.  That's all good, but they come out with the latest date first on the list and the earliest at the bottom.  I prefer the opposite to be ideal, but I can find no way or information on how to reverse the sort order.  Any help out there? Thanks.

    Hi, Richard -
    Look for a small triangle in the column's title bar/button. Click on that triangle - it should switch from pointing down to pointing up (or vice versa), indicated the sort order has been reversed.

  • Mail Message list sort order for Applescript in ML

    Hi All,
    I recently upgraded from SL to ML. I'm having a few issues with an applescript i use to flag/unflag emails for later handling.
    Basically, the script does the following:
    - get the message list from one of the inboxes/smartboxes. These are ordered by time and grouped by thread.
    - compare one message with the next one
    - if some criterias are equal (thread ID, subject, ...) then the second email is unflagged
    - repeat until end of list.
    It was working fine in SL, as a result, i only had the first email of threads with a flag, so the others could be forgotten.
    In ML, it looks like even though the emails are displayed in a specific order (date/thread), using
    messages of first message viewer
    does not fetch the messages in the same order, so matching cannot happen.
    Is this the expected behavior in ML ? Is there anyway to have the list of messaged sorted as displayed ?
    Thanks
    jm

    I found a workaround, though there must be something neater.
    I added this before my script
    tell application "System Events"
              tell process "Mail"
                        tell menu bar 1
                                  tell menu bar item "View"
                                            tell menu "View"
                                                      tell menu item "Sort By"
                                                                tell menu "Sort By"
                                                                          click menu item "Subject"
                                                                end tell
                                                      end tell
                                            end tell
                                  end tell
                        end tell
              end tell
    end tell
    then the same except "Date" instead of "Subject".
    My script does what i want now.

  • Cannot set view time in Calendar via Applescript

    I use the AppleScript below in an application to capture the weekly calendar view. I would swear, under an OS release before 10.9.5, this would cause the the Calendar view to be set with the top line at 7am of the current day. Now, the Calendar view ignores the time setting. Can anyone suggest whether this is a bug and/or provide a workaround?
    TIA
    set daytoshow to (current date)
    set the time of daytoshow to 60 * 60 * 7
    tell application "Calendar"
      activate
      view calendar at daytoshow
      switch view to week view
      set the visible of the first window to true
    end tell

    Your wife could publish her MobileMe Calendar and then you could subscribe to it on your iPhone.

  • Text Date in sort order of date

    Hi All;
    Below is my expression in SQL 
    (CONVERT(CHAR(4), e.createdon, 100) + CONVERT(CHAR(4), e.createdon, 120) as createdon
    its gives output Oct 2013
    I need to sort this expression in date order
    Is this possible?
    Any help much appreciated
    Thanks
    Pradnya07

    No. But why not simply sorting by date?
    SELECT CONVERT(CHAR(4), e.createdon, 100) + CONVERT(CHAR(4), e.createdon, 120) AS createdon
    FROM yourTable e
    ORDER BY e.createdon;
    btw, using SQL Server 2012+:
    SELECT FORMAT(e.createdon, 'MMM yyyy')
    FROM yourTable e
    ORDER BY e.createdon;

  • Display dates in sales order via CIC0

    Dear experts,
    In SAP CRM 5.0, we've configured sales orders and dates. Via CRMD_ORDER transaction, dates are correctly displayed.
    But we're using interaction center (CIC0) and the screen with dates is not displayed.
    We've tried screen sequence control (CRMV_SSC) but we don't manage to display this ALV grid.
    Can someone help us?
    Thank you!

    to pass the values into order u have to create in  follow up document . if u still so get the values populated over there . check Spro -> crm->ic win clt->component configration ->visible compnents ->action box ->D p action box config -> go inside
    Give the BOR componet and appropiate metod and give the field .
    Hope this helps u

  • Why can't we "set visuals enabled" of iTunes via AppleScript anymore?

    You used to be able to set visuals enabled of iTunes to true or false. But the current version of Leopard and iTunes prohibit this.
    Thus if you do:
    tell application "iTunes"
    set visuals enabled to true
    end tell
    you get the error:
    AppleScript Error
    iTunes got an error: Can’t set visuals enabled to true.
    Is this a bug?

    Your code of ...
    tell application "iTunes" to set visuals enabled to true
    ... works, as expected, on a PowerPC G4 PowerMac, running Tiger (MacOS X 10.4.11), with iTunes v. 7.0.1.
    Your code presents the AppleScript error message of ...
    'iTunes got an error: Can’t set visuals enabled to true.'
    ... on an Intel based MacMini, running Tiger (MacOS X 10.4.11), with iTunes v. 7.5; and, and an Intel based MacBook, running 'Leopard'* (MacOS X 10.5.2), with iTunes v. 7.4.2, respectively.
    * - Dog crap.

  • Copying multiple contract's data to sales orders via BAPI.

    Hello Experts,
    We have a requirement to copy contract data into the sales order, reference multiple contracts and copy all data from referenced contract to the SO.The scenario is that a seperate contract is being refrenced at the header level and different contract is referenced to the line items.All the data needs to be copied to the header or item from the doucment being referenced.
    The standard BAPI available for creating the SO (CREATEDAT2) references the contract doucment, but doesnt copy all the data from the referencing doucment to the SO, as the copy control are not called.We also tried using the BAPI 'BAPI_SALESDOCUMENT_COPY', which copies all the data but only does this for a single contract reference at a time.The BAPi doesnt allow the specific items to be copied or doesnt allow the reference of multiple contracts at the line item level.
    Any BAPI which can be used or pointers to resolve this issue, will be very helpful.
    Thank you.
    Best Regards,
    Gaurav Bhardwaj.

    Better try to follow this
    [Read This Before Closing your Threads |Read This Before Closing your Threads;
    thanks
    G. Lakshmipathi

  • How to set default sorting order in ADF Table

    Hi,
    I want to set the default sorting order as ascending in adf table. Please help me regarding how can we do it.
    Using JDev 11.1.1.5.0

    Hi Frank,
    Thanks for the quick reply.
    I have done binding of table with list of pojos.
    The Class for which Data control is created is as:-
    public class DemoDC {
        private List<TableEntity> tableList =
            new ArrayList<TableEntity>();
        public List<TableEntity> getTableList() {
            return tableList;
        public void setTableList(List<TableEntity> tableList) {
            this.tableList = tableList;
    where TableEntity is a pojo which has all the columns as its attributes.
    Now when i do the above steps , after clicking on pencil icon and seecting the iterator name in the iterator tab (DemoDC-> tableList) , and selcting the 'sort criteria' tab when i select a column and try to set the sort order  I get error as ' Iterator can not be created for the selected node ' .

  • How do I set the default sort on a VIP mailbox?

    When I restart the mail reader and go to one of the VIP Mailboxes I have set up, the sort order is "Sort by From" and "Ascending."   Probably the most useless default I can think of.   Is there a way to set the default to "Date" and "Descending"?

    Try using Mail/View/Sort By

  • Change sort order in line graph

    Sorry, my mistake !
    In one of the ColLabels i had placed the xsl:sort line ABOVE the xsl:for-each.
    So, now it is working.
    In a line graph I need to change the sort order of the elements in my XML file.
    I need the elements to be sorted by month number, so that january comes first, then february etc.
    I have an element in the XML file called DATE which has the format 'YYYYMMDD'
    I tried first to change the sort command for the Label.
    <ColLabels>
    <xsl:for-each select=".//XX_ROW" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:sort select="substring(DATE,5,2)"/>
    That worked fine, the label values are resorted as I wanted.
    Of course, I also have to set the same sort order for the data values.
    So I did that in the same way :
    <RowData>
    <xsl:for-each select=".//XX_ROW" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:sort select="substring(DATE,5,2)"/>
    But, to my surprise, I got an error :
    Caused by: oracle.xdo.parser.v2.XSLException: <Line 70, Column 45>:
    XML-22047: (Error) Invalid instantiation of 'xsl:sort' in 'RowData' context.
    Does anybody understand why this was not possible ?
    Is there another syntax for sorting in the RowData ?
    What's the use of being able to sort the X axis lable, if I am not able to sort the data ?
    Edited by: user792912 on 2011-maj-30 05:11

    This was an error I had made in the graph code.
    The xsl:sort line must be placed AFTER the xsl:for-each !

  • Sort order in Leave Request Approver screen

    Hi,
    Where can I set the the sort order for the portal screen which lists the managers tasks to approve when they select 'Launch WebDynpro' from the UWL.
    Rob

    This is the note 1484853 but as i said you cant see it unless you raise a Message for SAP , We have to add yout company to the note.
    these are the steps
    Symptom
    In LeaveRequestApprover application, a higher level manager can
    approve/reject a leave though he/she is not the owner of the approval
    workitem (TS12300097). It happens when a higher level manager clicks on
    the leave in the TeamCalendar launched from the LeaveRequestApprover
    application.
    Other terms
    LeaveRequestApprover, TS12300097, prepare_select, WorkList,
    LPT_ARQ_REQUEST_UIAF07
    Reason and Prerequisites
    Reason:- This is caused because the approve/reject button were not
    restricted based on the logged in user.
    Prerequisites:- IT105 entries for the backend PERNRs should be correctly
    maintained.
    You can check here
    Object REPS LPT_ARQ_REQUEST_UIAF07
    Object Header FUGR PT_ARQ_REQUEST_UIA
    FORM PREPARE_SELECT
    the note is meant for few customers only

Maybe you are looking for

  • Left My macbook on charge

    Hi .. Mmmm .. Today I left my macbook charging & I went out & forgot my macbook charging for about 1 hour and it's full charged ! Will something happen for it or not ??

  • My G4 won't detect an expansion USB

    Hey all- Looks like alot of us early adopters are on the boards tonight. Here's my problem; I did a clean erase and install on my G4, and everything is pretty good so far. however my G4 can no longer read several of my devices I use (Scanner and tabl

  • How do I insert a row in Numbers?

    I see no function for the insertion of a row or column available.  Is it even possible?

  • How to get structure from Idoc using function module?

    Hi all, I am looking for a function module in order to get the structure of a message type used for iDoc. The aim is to get the data element from the different fields in order to check authority if the data element is BUKRS. Thanks for your help! Dav

  • JSP Applet communication

    Hi all , I know this question has been asked so many times and I have read all the posts but still i was unsuccessful. I am trying to send a string from a jsp to another jsp which is loading the applet to display that string. In my first jsp: <form m