• 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
Re: clear apple menu's recent items script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clear apple menu's recent items script


  • Subject: Re: clear apple menu's recent items script
  • From: Irwin Poche <email@hidden>
  • Date: Sat, 15 Apr 2006 22:06:31 -0500


On Apr 15, 2006, at 3:23 PM, John Baltutis wrote:

On 04/14/06,  Irwin Poche <email@hidden> wrote:
On Apr 13, 2006, at 12:57 PM, Adam Bell wrote:

They're stored in ~/Library/Preferences/com.apple.recentitems.pref

Moving that file to the trash (AS or drag-n-drop) and emptying the
trash does not clear the items shown in Apple > Recent Items.

Maybe this <http://www.macosxhints.com/article.php?story=20050919045154542>
will shed some light on the issue.

Thank you John, that's an interesting article.  I played around with the defaults command but as you suggested it does not appear to work for what's shown in the Recent Items menu.

What does work is to UI script the Apple > Recent Items > Clear Menu to clear all Apps, Docs, and Servers.  I want to clear only the Docs and Apps.  This script clears those items on the menu and also causes ~/Library/Preferences/com.apple.recentitems.pref to be rewritten so that the old Doc and App data has also been removed from the file.

Watch out for wrapping.



set allreadyRunning to "System Preferences" is in (do shell script "ps -xwwc")

--this cmd does not return to AS until app is running and pane is displayed
tell application "System Preferences" to set current pane to pane "com.apple.preference.general"

tell application "System Events" to tell process "System Preferences"
set frontmost to true


tell group 1 of window "Appearance"


set {AppRecent, DocRecent} to ¬
{value of pop up button 1, value of pop up button 2}


click pop up button 1
click menu item "None" of menu of pop up button 1 -- Apps
delay 0.5
click pop up button 2
click menu item "None" of menu of pop up button 2 -- Docs
delay 0.5


click pop up button 1
click menu item AppRecent of menu of pop up button 1
delay 0.5
click pop up button 2
click menu item DocRecent of menu of pop up button 2
delay 0.5
end tell
end tell

if not allreadyRunning then tell application "System Preferences" to quit


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: clear apple menu's recent items script
      • From: kai <email@hidden>
References: 
 >Re: clear apple menu's recent items script (From: John Baltutis <email@hidden>)

  • Prev by Date: Copying with identically named volumes
  • Next by Date: Re: Copying with identically named volumes
  • Previous by thread: Re: clear apple menu's recent items script
  • Next by thread: Re: clear apple menu's recent items script
  • Index(es):
    • Date
    • Thread