On Apr 15, 2006, at 3:23 PM, John Baltutis 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.
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
|