Greater Than a certain Date in AppleScript Studio?

Discussion in 'Mac Programming' started by allbrokeup, Jun 3, 2008.

  1. allbrokeup macrumors 6502

    Joined:
    Mar 6, 2008
    Location:
    Melbourne, Australia
    #1
    Hi,

    Recently my HDD failed and i lost a key program applescript that I used for programming. Here is my problem;

    If anyone could tell me how to implement this in AppleScript Studio:

    If the date is passed "Monday, August 11th 2008 12:00:00 AM" then
    --put rest of script here--

    Else if the date is before "Monday, August 11th 2008 12:00:00 AM" then
    --rest of script here--
    end

    I had some code that was like that, but not the same as the above example which worked. It detected that the date had passed or not passed and was written down in a way that if the date had passed, the rest of the script wouldn't activate because i added it onto the "onLaunched" handler.

    Could anyone nut out this script?

    thankyou

    allbrokeup
     
  2. MongoTheGeek macrumors 68040

    MongoTheGeek

    Joined:
    Sep 13, 2003
    Location:
    Its not so much where you are as when you are.
    #2
    Code:
    If theDate > date "August 11, 2008" then
        doStuff()
    else
        doOtherStuff()
    endif
    
     
  3. allbrokeup thread starter macrumors 6502

    Joined:
    Mar 6, 2008
    Location:
    Melbourne, Australia
    #3
    thankyou!, thankyou!, thankyou!

    Works like a charm.

    allbrokeup
     

Share This Page