• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to start an apple event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to start an apple event


  • Subject: Re: How to start an apple event
  • From: John W Baxter <email@hidden>
  • Date: Mon, 1 Jan 2001 20:46:19 -0800

At 10:40 -0800 12/31/00, Paul Berkowitz wrote:
>On 12/31/00 10:24 AM, "email@hidden" <email@hidden> wrote:
>
>> Hi,
>>
>> I am new to AppleScript but love it.
>>
>> I am trying to find a way to start a script that would be used to start a
>> FileMaker Pro script at a certain time of the month.
>>
>> I am e-mailing reports every day, but at the end of the month I need to
>> e-mail a monthly and and sales tax report. I have a script that start the
>> daily report every day when the Mac is turned on.
>>
>> I have to determine if today is the first day of the month, and if so,
>> start a FileMaker script for e-mailing the reports for the previous
>> month.
>>
>> I would appreciate any help on writting a script to find out if today is
>> the first of the month.
>>
>> Thank you
>>
>
>It would probably be a good idea to guard against restarting the computer
>later on the same day on the first of a month and having the report go out a
>second time.
>
>property theMonth : ""
>
>set today to (current date)
>
>if day of today is 1 then
> if month of today is not theMonth then
> set theMonth to month of today
> tell application "FileMaker Pro"
> --open alias/database with the FMP script
> do script FileMaker script "Name Here"
> end tell
> end if
>end if

I'd go a little farther, to guard against a first of the month on which the
computer is not on. [Such as, perhaps January 1.] Even if it is intended
to run the computer full time, there are machine failures, power outages,
etc. [If the rest of the work flow involves setting the machine back to
the first of the month in those cases, that's another matter.]

I think that can be done simply by removing the outermost test from Paul's
code.

--John

--
John Baxter email@hidden Port Ludlow, WA, USA


  • Prev by Date: Re: Bounds?
  • Next by Date: Re: resetting record values to ""
  • Previous by thread: Re: Bounds?
  • Next by thread: Palm Desktop Primary Category
  • Index(es):
    • Date
    • Thread