Title: Re: Two items from before (item 2)
Paul, I am not clear on what you actually did to make it work. Are you certain you had Entourage registered for English when you tested? Dan, you are correct that I am using literal strings.
When I tried adding "as Unicode text" the data in the contact's text fields was set to mojibake regardless of the language Entourage was registered for. That is, the as Unicode text made the problem worse. (However, it was the same garbage text regardless of which language Entourage was registered for.)
Once again, the script (in the version that works when Entourage is registered for Japanese):
tell application "Microsoft Entourage"
set Sel to the selection
set Stype to class of (item 1 of Sel)
count Sel
if the result is not 1 or Stype is not contact then
error "You must select only one contact."
return
end if
set contact1 to item 1 of Sel
-- company
set company of contact1 to "伊藤忠テクノサイエンス"
set company furigana of contact1 to "いとうちゅうてくのさいえんす"
-- business web page
set business web page of contact1 to "www.ctc-g.co.jp"
-- Business address fields
set street address of business address of contact1 to "1丁目11番5号"
set city of business address of contact1 to "千代田区富士見"
set state of business address of contact1 to "東京都"
set zip of business address of contact1 to "102-8166"
set country of business address of contact1 to "日本"
-- main phone number
set main phone number of contact1 to "+81-3-5226-1200"
-- Japanese format , but we cannot sync these contacts right now
set Japanese format of contact1 to true
set sync with palm of contact1 to false
end tell
This version will fail regardless of the registration of Entourage:
tell application "Microsoft Entourage"
set Sel to the selection
set Stype to class of (item 1 of Sel)
count Sel
if the result is not 1 or Stype is not contact then
error "You must select only one contact."
return
end if
set contact1 to item 1 of Sel
-- company
set company of contact1 to "伊藤忠テクノサイエンス" as Unicode text
set company furigana of contact1 to "いとうちゅうてくのさいえんす" as Unicode text
-- business web page
set business web page of contact1 to "www.ctc-g.co.jp"
-- Business address fields
set street address of business address of contact1 to "1丁目11番5号" as Unicode text
set city of business address of contact1 to "千代田区富士見" as Unicode text
set state of business address of contact1 to "東京都" as Unicode text
set zip of business address of contact1 to "102-8166"
set country of business address of contact1 to "日本" as Unicode text
-- main phone number
set main phone number of contact1 to "+81-3-5226-1200"
-- Japanese format , but we cannot sync these contacts right now
set Japanese format of contact1 to true
set sync with palm of contact1 to false
end tell
The system is Mac OS X 10.1.5 (build 5566) with the system language set to English and all software updates installed (it also has all the language updates installed). Entourage is the SR-1 version, and registered for Japanese.
--
Eric Hildum
- Two items from before Eric Hildum
- Re: Two items from before Paul Berkowitz
- Re: Two items from before Dan Crevier
- Re: Two items from before (item 2) Eric Hildum
- Re: Two items from before (item 2) Paul Berkowitz
- Re: Two items from before (item 2) Paul Berkowitz
- Re: Two items from before (item... Eric Hildum
- Re: Two items from before (... Paul Berkowitz
- Re: Two items from before (... Eric Hildum
- Re: Two items from before (... Paul Berkowitz
- Re: Two items from before (... Bradley Mohr
- Re: Two items from before (... Paul Berkowitz
- Is it safe yet? Domains4Days.com
- Re: Is it safe yet? George Clark
