Re: owner name
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