• 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: The Ones & Oh's of Logic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Ones & Oh's of Logic


  • Subject: Re: The Ones & Oh's of Logic
  • From: Chris Page <email@hidden>
  • Date: Fri, 15 Mar 2002 15:59:01 -0800

On Friday, March 15, 2002, at 05:00 , David Groover wrote:

It would be useful for my understanding of scripting if someone would be kind enough to clarify something for me. In the following example, why am I using the zero in "address 0"?
...
tell application "Palm Desktop"
set strFullname to full name of address 0
set strEmail to text of address 0
end tell

In Palm Desktop, "address 0" refers to the current address object in the address details window. This works even if the window is closed.

Or does calling it address zero, refer to the address of the field that you are in when you launch the script? In Palms case the scriptable button refers directly to a specific field. Does zero in this case always mean the field which the script is pointing to? If not then how can I tell which fields in Palm are numbered, and by what numbers?

In a script invoked via a custom field button, the currently-displayed address object, referred to by "address 0", is usually the same as the one that the script was invoked from. However, this is not guaranteed. If the currently displayed address changes while your script is running, "address 0" will refer to the new object instead of the one that the script was invoked from. So be careful to get the information you need from the address as soon as possible in your script.

Except for the special case of address zero, referring to objects by index in Palm Desktop refers to them as they are currently listed in the appropriate list window. So, "address 1" means the first address in the Address List window. If you change the sort or view options to change the order or content of the list, then the index numbers will refer to items in the order as they appear in the new list.

If you want to make sure your script indexes over every object of a given class, first use "show all in" to make them all visible. For example, to make sure all the address objects are shown, use:

tell app "Palm Desktop" to show all in window "Address List"

--
Chris Page - Mac OS Lead, Palm Desktop - Palm, Inc.
_______________________________________________
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: 
 >The Ones & Oh's of Logic (From: David Groover <email@hidden>)

  • Prev by Date: Re: theSIMS -- Applescript copy paste from Explorer
  • Next by Date: Re: theSIMS -- Applescript copy paste from Explorer
  • Previous by thread: Re: The Ones & Oh's of Logic
  • Next by thread: Re: The Ones & Oh's of Logic
  • Index(es):
    • Date
    • Thread