• 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: scripting secure empty trash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting secure empty trash


  • Subject: Re: scripting secure empty trash
  • From: Yvan KOENIG <email@hidden>
  • Date: Thu, 13 Jul 2006 20:31:53 +0200


Le 13 juil. 2006, à 20:02, Andrew Brosnan a écrit :

Hello,

I'd like to use 'secure empty trash' in an Applescript. I can't find
reference to how to do this, and my attempts have so far failed. Anyone
know how to do this?


The kai's responce is fine but is for english users only.

Here is one working worldwide.

tell application "System Events" to tell application process "Finder"
set frontmost to true
(* to get the exact menu item number
get name of every menu item of menu "Finder" of menu bar item "Finder" of menu bar 1
get name of menu item 7 of menu "Finder" of menu bar item "Finder" of menu bar 1
*)
click menu item 7 of menu "Finder" of menu bar item "Finder" of menu bar 1
keystroke return
end tell



I added a "keystroke return" because I assumes that if someone uses a script to call "safe empty trash", it's not to be asked for a manual keypress.

Yvan KOENIG
 _______________________________________________
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: scripting secure empty trash
      • From: kai <email@hidden>
References: 
 >scripting secure empty trash (From: Andrew Brosnan <email@hidden>)

  • Prev by Date: parameter passing from cocoa to AS
  • Next by Date: OT: Itunes PC SDK
  • Previous by thread: Re: scripting secure empty trash
  • Next by thread: Re: scripting secure empty trash
  • Index(es):
    • Date
    • Thread