Re: Recent Items
Re: Recent Items
- Subject: Re: Recent Items
- From: Shane Stanley <email@hidden>
- Date: Fri, 11 Apr 2014 10:03:22 +1000
On 11 Apr 2014, at 3:40 am, koenig.yvan <email@hidden> wrote:
I’m really bored because I didn't found an other file containing the embedded infos.
You're assuming there is such a file, but there probably isn't -- the defaults process probably keeps them in memory until it feels the need to write them. This might get you more up-to-date results:
use framework "Foundation"
on returnRecentAppPaths() set defs to current application's NSUserDefaults's standardUserDefaults() defs's addSuiteNamed:"com.apple.recentitems" set theBookmarkData to (defs's valueForKeyPath:"RecentApplications.CustomListItems.Bookmark") as list set thePaths to {} repeat with aData in theBookmarkData set theInfo to (current application's NSURL's resourceValuesForKeys:{current application's NSURLPathKey} fromBookmarkData:aData) set end of thePaths to (theInfo's valueForKey:(current application's NSURLPathKey)) as text end repeat return thePaths end returnRecentAppPaths
|
_______________________________________________
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