Hello, I’m having this problem, when I execute this code
on run
tell application "Finder"
set the Enclosing_Folder to my Get_Me() -- What would be the easy way of getting the enclosing folder where the app is placed? -- Tried enclosing, containing.
set the File_List to (every file of Enclosing_Folder whose name extension contains "txt")
end tell
repeat with This_File in File_List
display dialog (name of This_File) as string -- just for check
set This_File to This_File as alias
set Propiedades to my Process_File(This_File) -- gets fields from ".txt" template I wrote to add someone to the "Address Book"
my New_Item(Propiedades) -- add's a person to "Address Book" acording to the info collected by Process_File()
activate -- returning from (tell app "Address Book"), regaining control
display dialog ("Finished: " & This_File) as string -- just for check
end repeat
end run
The thing is that New_Item() works fine the first time, but returns:
the second time, when processing the next file. Why? It’s as if once the script uses the subroutine it trows it away and forgets about it!
Another thing not working is:
tell app "Address Book"
set birth date of person "XX" to "dd/mm/yyyy" -- should it be "mm/dd/yyyy"? My system configuration is as I typed it first. Tried them all though ...
-- first name, last name, note, organization all work, but not birth date (which is a direct property of the class person). How do I activate it?
end tell
I’m running OS 10.3
Ok, I thing that’s it for now! Thank’s a lot!