Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Smbryant20

macrumors newbie
Original poster
Sep 23, 2017
1
0
I am trying to build an AppleScript to open system preferences, click on the Java icon at the bottom. I am good up to this point. Then the Java Control Panel Panel opens up. This is where I need help to click “settings...” for temperary internet files, choose “delete files...”, check the third check box for “installed application and applets” and thick clicking ok to close that window and then ok to close temp files settings window,and then ok to close the Java Control Panel.

I know that’s a lot of step but any way to get this done or another way to complete it would be a great big help!

Thanks.
 
Hi,

I'm no expert on Java, I'm afraid, so I don't know exactly *what* clicking on the "delete files..." button you mention actually deletes.

However, having said that, it's usually best to keep UI scripting as an absolute last resort. In my experience, it's hard work to script and the results are usually flakey and unreliable. If you can figure out which files/folders it's clearing out then you're probably better off scripting the Finder using it's scripting dictionary to do the deletion.

Maybe there's more to it than I understand, given my unfamiliarity with Java. If so then my apologies!
 
The location of the Temporary Internet Files would be : /Users/someuser/Application Support/Oracle/Java/Deployment/cache

Bingo! :)

So, all you'd need to do is delete the files in that folder with an AppleScript or shell script. The latter would probably be my personal choice. Much easier and more reliable than UI scripting.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.