FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Re: Show ALIAS in find caller ID in address book

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Salling Software Forums Forum Index -> Archives
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Jun 11, 2004 5:05 pm    Post subject: Re: Show ALIAS in find caller ID in address book Reply with quote

I have tried but is not working, it just skips the step where it should=20
show the nickname.... I have tried scripting it to show first the=20
company (for example) and it works, but it seems that it doesn't=20
recognize the field NICKNAME. Any suggestions??

on phone_call_status_notification(p)
tell application "SEC Helper"
if the_call_status of p is idle then
hide screen
else if the_call_status of p is active then
hide screen
else if the_call_status of p is alerting then
set phone_number to missing value
set the_person_properties to missing value
try
set phone_number to the_phone_number of p
set the_person_properties to find person phone_number with result=20
as record
set the_name to phone_number
=09=09=09=09
try
set the_name to |Nickname| of the_person_properties
on error
try
set the_name to |First| of the_person_properties & " " & |Last|=20
of the_person_properties
on error
try
set the_name to |First| of the_person_properties
on error
try
set the_name to |Organization| of the_person_properties
end try
end try
end try
end try
=09=09=09=09
set the_picture to my picture_for_person(|UID| of=20
the_person_properties)
if the_picture is not missing value then
show screen picture data the_picture message "Llamada de " &=20
the_name duration 10.0
else
show screen message "Llamada de " & the_name duration 10.0
end if
=09=09=09=09
on error
if phone_number is missing value then
show screen message "Llamada entrante " duration 10.0
else
show screen message "Llamada de " & phone_number duration 10.0
end if
end try
end if
end tell
end phone_call_status_notification

on picture_for_person(the_person_id)
try
tell application "Finder"
set image_folder to (home as string) & "Library:Application=20
Support:AddressBook:Images:"
set image_path to image_folder & (characters 1 through -10 of=20
the_person_id)
return read (alias image_path) as picture
end tell
on error
return missing value
end try
end picture_for_person


El 11/06/2004, a las 1:58, Joris de Beer escribi=F3:

> You can read the Applescript dictionary of an Application by dragging=20
> its dock icon over the Script Editor icon, whilst holding down option=20
> and command.
>
> I think that the alias field you are referring to is also known as the=20
> nickname and is part of the person class in the Address Book=20
> applescript dictionary.
>
>
> On 10/06/2004, at 5:18 AM, arepand wrote:
>
>> How can I choose the ALIAS field of the address book to be chosen=20
>> first, and then if it is
>> empty, go on with the script and show the name??
>> I have tried it but I am not sure it ALIAS is a script function of=20
>> addressbook
>>
>> Alfredo


------------------------------------
Alfredo Rep=E1raz Andrade
arepand@a...
------------------------------------
Back to top
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Fri Jun 11, 2004 7:29 pm    Post subject: Re: Show ALIAS in find caller ID in address book Reply with quote

The nickname property of Address Book isn't yet passed in the result of=20
"find person". I've added it in the next version; please let me know if=20
you want more properties.

Thanks.
--
Jonas Salling
President, Salling Software AB

On 2004-06-11, at 17.05, Alfredo Rep=E1raz Andrade wrote:

> I have tried but is not working, it just skips the step where it=20
> should show the nickname.... I have tried scripting it to show first=20
> the company (for example) and it works, but it seems that it doesn't=20
> recognize the field NICKNAME. Any suggestions??
>
> on phone_call_status_notification(p)
> tell application "SEC Helper"
> if the_call_status of p is idle then
> hide screen
> else if the_call_status of p is active then
> hide screen
> else if the_call_status of p is alerting then
> set phone_number to missing value
> set the_person_properties to missing value
> try
> set phone_number to the_phone_number of p
> set the_person_properties to find person phone_number with result=20
> as record
> set the_name to phone_number
>=20=09=09=09=09
> try
> set the_name to |Nickname| of the_person_properties
> on error
> try
> set the_name to |First| of the_person_properties & " " & |Last|=20
> of the_person_properties
> on error
> try
> set the_name to |First| of the_person_properties
> on error
> try
> set the_name to |Organization| of the_person_properties
> end try
> end try
> end try
> end try
>=20=09=09=09=09
> set the_picture to my picture_for_person(|UID| of=20
> the_person_properties)
> if the_picture is not missing value then
> show screen picture data the_picture message "Llamada de " &=20
> the_name duration 10.0
> else
> show screen message "Llamada de " & the_name duration 10.0
> end if
>=20=09=09=09=09
> on error
> if phone_number is missing value then
> show screen message "Llamada entrante " duration 10.0
> else
> show screen message "Llamada de " & phone_number duration 10.0
> end if
> end try
> end if
> end tell
> end phone_call_status_notification
>
> on picture_for_person(the_person_id)
> try
> tell application "Finder"
> set image_folder to (home as string) & "Library:Application=20
> Support:AddressBook:Images:"
> set image_path to image_folder & (characters 1 through -10 of=20
> the_person_id)
> return read (alias image_path) as picture
> end tell
> on error
> return missing value
> end try
> end picture_for_person
>
>
> El 11/06/2004, a las 1:58, Joris de Beer escribi=F3:
>
>> You can read the Applescript dictionary of an Application by dragging=20
>> its dock icon over the Script Editor icon, whilst holding down option=20
>> and command.
>>
>> I think that the alias field you are referring to is also known as=20
>> the nickname and is part of the person class in the Address Book=20
>> applescript dictionary.
>>
>>
>> On 10/06/2004, at 5:18 AM, arepand wrote:
>>
>>> How can I choose the ALIAS field of the address book to be chosen=20
>>> first, and then if it is
>>> empty, go on with the script and show the name??
>>> I have tried it but I am not sure it ALIAS is a script function of=20
>>> addressbook
>>>
>>> Alfredo
>
>
> ------------------------------------
> Alfredo Rep=E1raz Andrade
> arepand@a...
> ------------------------------------
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Guest






PostPosted: Fri Jun 11, 2004 8:24 pm    Post subject: Re: Show ALIAS in find caller ID in address book Reply with quote

thanks Jonas


El 11/06/2004, a las 19:28, Jonas Salling escribi=F3:

> The nickname property of Address Book isn't yet passed in the result=20
> of "find person". I've added it in the next version; please let me=20
> know if you want more properties.
>
> Thanks.
> --
> Jonas Salling
> President, Salling Software AB
>
> On 2004-06-11, at 17.05, Alfredo Rep=E1raz Andrade wrote:
>
>> I have tried but is not working, it just skips the step where it=20
>> should show the nickname.... I have tried scripting it to show first=20
>> the company (for example) and it works, but it seems that it doesn't=20
>> recognize the field NICKNAME. Any suggestions??
>>
>> on phone_call_status_notification(p)
>> tell application "SEC Helper"
>> if the_call_status of p is idle then
>> hide screen
>> else if the_call_status of p is active then
>> hide screen
>> else if the_call_status of p is alerting then
>> set phone_number to missing value
>> set the_person_properties to missing value
>> try
>> set phone_number to the_phone_number of p
>> set the_person_properties to find person phone_number with result=20
>> as record
>> set the_name to phone_number
>>=20=09=09=09=09
>> try
>> set the_name to |Nickname| of the_person_properties
>> on error
>> try
>> set the_name to |First| of the_person_properties & " " & |Last|=20
>> of the_person_properties
>> on error
>> try
>> set the_name to |First| of the_person_properties
>> on error
>> try
>> set the_name to |Organization| of the_person_properties
>> end try
>> end try
>> end try
>> end try
>>=20=09=09=09=09
>> set the_picture to my picture_for_person(|UID| of=20
>> the_person_properties)
>> if the_picture is not missing value then
>> show screen picture data the_picture message "Llamada de " &=20
>> the_name duration 10.0
>> else
>> show screen message "Llamada de " & the_name duration 10.0
>> end if
>>=20=09=09=09=09
>> on error
>> if phone_number is missing value then
>> show screen message "Llamada entrante " duration 10.0
>> else
>> show screen message "Llamada de " & phone_number duration 10.0
>> end if
>> end try
>> end if
>> end tell
>> end phone_call_status_notification
>>
>> on picture_for_person(the_person_id)
>> try
>> tell application "Finder"
>> set image_folder to (home as string) & "Library:Application=20
>> Support:AddressBook:Images:"
>> set image_path to image_folder & (characters 1 through -10 of=20
>> the_person_id)
>> return read (alias image_path) as picture
>> end tell
>> on error
>> return missing value
>> end try
>> end picture_for_person
>>
>>
>> El 11/06/2004, a las 1:58, Joris de Beer escribi=F3:
>>
>>> You can read the Applescript dictionary of an Application by=20
>>> dragging its dock icon over the Script Editor icon, whilst holding=20
>>> down option and command.
>>>
>>> I think that the alias field you are referring to is also known as=20
>>> the nickname and is part of the person class in the Address Book=20
>>> applescript dictionary.
>>>
>>>
>>> On 10/06/2004, at 5:18 AM, arepand wrote:
>>>
>>>> How can I choose the ALIAS field of the address book to be chosen=20
>>>> first, and then if it is
>>>> empty, go on with the script and show the name??
>>>> I have tried it but I am not sure it ALIAS is a script function of=20
>>>> addressbook
>>>>
>>>> Alfredo
>>
>>
>> ------------------------------------
>> Alfredo Rep=E1raz Andrade
>> arepand@a...
>> ------------------------------------
------------------------------------
Alfredo Rep=E1raz Andrade
arepand@a...
------------------------------------
Back to top
Guest






PostPosted: Fri Jun 11, 2004 8:54 pm    Post subject: Re: Show ALIAS in find caller ID in address book Reply with quote

I was wondering if it was possible to add this function:

When it searches the address book, can you tell it not to search in a
concrete group?? (I have seen something similar in other scripts). This
is because I have a group which I use to sync my phone, and all of
these entries are a simplified version of the complete card, so I have
lots of entries doubled, but I want the script to look for the extended
version of the card....

Thanks....


El 11/06/2004, a las 19:28, Jonas Salling escribió:

> The nickname property of Address Book isn't yet passed in the result
> of "find person". I've added it in the next version; please let me
> know if you want more properties.
>
> Thanks.
> --
> Jonas Salling
> President, Salling Software AB
>
>>
------------------------------------
Alfredo Repáraz Andrade
arepand@a...
------------------------------------


Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Salling Software Forums Forum Index -> Archives All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group