09-11-2017, 06:35 PM #1
- Member Since
- Sep 11, 2017
applescript - how to click a button an an app maade from an applescript
- Rep Power
I need to move all the items in a folder to the trash, empty the trash and restart. I have written an applescript that does all that and works perfectly when run. I saved the script as an app so that I could run it at 3:40 AM through Calendar. When the app executes (but not when the script is run) it displays a dialog with an Empty Trash dialog. Because no one is present to click the Empty Trash button the restart command times out.
The script is:
tell application "Finder"
delete every item of folder "Caches" of folder "Library" of home
How do I make the script (or rather the app) click the Empty Trash button immediately after the empty trash step?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By dopi04 in forum macOS - Operating SystemReplies: 0Last Post: 08-10-2016, 02:08 AM
By Jon57 in forum macOS - Operating SystemReplies: 9Last Post: 01-20-2012, 11:13 AM
By JSS in forum macOS - Development and DarwinReplies: 4Last Post: 08-27-2011, 01:28 PM
By claudiogi in forum macOS - Development and DarwinReplies: 1Last Post: 12-18-2008, 01:03 AM
By jakenoble in forum macOS - Development and DarwinReplies: 2Last Post: 08-25-2007, 06:13 PM