• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Get Apple ID from AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get Apple ID from AppleScript


  • Subject: Get Apple ID from AppleScript
  • From: Takaaki Naganoya <email@hidden>
  • Date: Tue, 24 Jan 2017 18:06:18 +0900

Hi everyone,

I’m looking for the way to get current user’s Apple ID.
Some people say “you’d better to get myCard from Contacts.app”.

Someday, I found the way to get it with macOS 10.12.
Some machine returns the information which I expected, some machine (clean installed) does not returns.
I think there is some “condition” to get Apple ID.
For example…the account which is used to talk with Message.app….

How do you think about this?

<AppleScript>
set icList to getICloudAccountIDandAliases() of me

on getICloudAccountIDandAliases()
set aPath to (path to application support from user domain) as string
set bPath to aPath & "iCloud:Accounts:"
try
tell application "Finder"
tell folder bPath
set aList to name of every file
end tell
end tell


return aList
on error
return {}
end try
end getICloudAccountIDandAliases
</AppleScript>
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Get Apple ID from AppleScript
      • From: Paul Fidler <email@hidden>
    • Re: Get Apple ID from AppleScript
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Satimage.osax Understands Tilde-Based Paths
  • Next by Date: Re: Script Editor in Sierra – Auto-Opens Open Dialog?
  • Previous by thread: Satimage.osax Understands Tilde-Based Paths
  • Next by thread: Re: Get Apple ID from AppleScript
  • Index(es):
    • Date
    • Thread