OSX - Reading adresscardfiles doesnt work

Jim Ault JimAultWins at yahoo.com
Tue Nov 27 16:09:28 EST 2007


On 11/27/07 12:46 PM, "R. Hillen" <mail at richard-hillen.de> wrote:

> On Mac OS X, RR 2.8.1 I want to read the data in the adresscardfiles;
> so I tried:
> 
> ----
> on mouseup
>    --set the folder with addresscards
>    put "Users/MyUserName/Library/Caches/com.apple.AddressBook/
> MetaData/" into AdressFolder
>    set the defaultfolder to AdressFolder
>    --List of cards
>    put files() into CardList
>    filter CardList with "*AB*"
>    --read first card
>    put line 1 of CardList into CardFileName
>    put AdressFolder & CardFileName into CardFilePath
> 
>    if there is a file CardFilePath then
>      answer "ok"
>    else
>      answer "card not found!"
>    end if
> end mouseup
> -----
> 
> The Answer is always "Card not found!"
> 
> I suspect, that the cause is the slash in the name of the
> adressfiles, so for instance:
> 
> "0B4A452B-0669-483C-B85E-4DB56F4CA2EC/ABPerson.abcdp"
> 
> If I do
> put url("file:"&CardFilePath) into CardData
> it is empty.
> The easy way to find the correct path is to do the following in the message
box

answer file "Your Choice"
put it
--    hit enter
--       make your choice
--  click OK
then read the result

Also add to your script the one line
answer "defaultFolder = " & the defaultFolder

Hope this helps

Jim Ault
Las Vegas





More information about the use-livecode mailing list