• 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: owner name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: owner name


  • Subject: Re: owner name
  • From: Hans Haesler <email@hidden>
  • Date: Thu, 19 Apr 2001 15:32:34 +0200

On Thu, 19 Apr 2001, Magnus Stockhaus wrote:

>How do I get the ownername in a script? I would like to have the
>ownername as a default answer in a dialog.

I do exactly this in one of my scripts. Here, every user has his
three-character unique ID, so I translate them:
---
try
set aUser to owner name
on error
set aUser to "unknown"
end try
if aUser = "" then set aUser to "non defined"
if aUser = "ctr" then
set aUser to "Corinne"
else if aUser = "hsa" then
set aUser to "Hans"
--and so on
end if
---

Then the script gets the name of the document and alerts the user
if the document has not been registered:
---
if docName starts with "Docu" then
display dialog aUser & ",

you should register your document." buttons "OK" default button 1 with icon 2 giving up after 2
end if
---

HTH,

Hans

---
Hans Haesler | email@hidden


  • Prev by Date: Re: how to sort records??
  • Next by Date: Re: Re: How to script URL Access to post radio buttons?
  • Previous by thread: Re: Simultaneous Events
  • Next by thread: Attaching a Folder Action
  • Index(es):
    • Date
    • Thread