• 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
Upcoming changes to Palm Desktop scripting (2 of 3)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Upcoming changes to Palm Desktop scripting (2 of 3)


  • Subject: Upcoming changes to Palm Desktop scripting (2 of 3)
  • From: Chris Page <email@hidden>
  • Date: Sat, 19 Apr 2003 15:59:36 -0700

[This is part 2 of 3.]

make new event with data {title:"Meeting with Steve Jobs", date:current date, start time:"8:00 AM", duration:60}

This could be rewritten as:

make new event with properties {title:"Meeting with Steve Jobs", start time:date ("" & "8:00 AM"), duration:1 * minutes}

['date ("" & "8:00 AM")' is a convenient way to specify 8am on the current date.]

New to do (task) with initial data

Includes the setting of a category, which can be new or existing.

set newTask to make new to do with data {title:"test - delete this", due date:current date, primary category:category "Friends"}

It used to be that you could "automagically" create a category (or a label, IIRC) just by referring to one that does not yet exist. I've changed this so that you must explicitly create a new category before using it. The above example now returns an error if there is no "Friends" category. I believe this stricter behavior is more consistent and less likely to cause confusion or bugs in scripts.

Displaying objects

The previously created to do can be displayed in the Date Book window using this:

show to do (object newTask)

As noted earlier, the term 'object' and the object properties record are now obsolete. newTask should be a reference to the to do at this point in the example script, and so you now only have to write:

show newTask

The next example will show the first address in the last displayed address list. These numbers change depending on the address list they happen to have been in last.

show address 1

I've eliminated this limitation. It used to be that referring to items by index referred to their position in the corresponding list window, and if the list had filters the set of items accessible via AppleScript was limited to the list of items visible to the user. I've changed it so that index references can access all items regardless of what is visible in the UI and the order is unrelated to their order in the displayed list.

[continued in message now miss-titled "2 of 2"...]

--
Chris Page - Software Wrangler - Palm, Inc.

The most likely way for the world to be destroyed, most experts agree,
is by accident. That's where we come in; we're computer professionals.
We cause accidents. -- Nathaniel Borenstein
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Palm Desktop Script 101? (From: Richard Morton <email@hidden>)

  • Prev by Date: Upcoming changes to Palm Desktop scripting (1 of 3)
  • Next by Date: Show extensions?
  • Previous by thread: Upcoming changes to Palm Desktop scripting (1 of 3)
  • Next by thread: Upcoming changes to Palm Desktop scripting (1 of 2)
  • Index(es):
    • Date
    • Thread