You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Applescript show free memory

Hey,


I need an applescript that display the free memory in a textfield or a lable.

Any ideas?


thanks

Posted on Dec 22, 2012 11:02 AM

Reply
16 replies

Sep 14, 2016 10:51 PM in response to Rune Piper

This script rounds out the used memory, and prevents rapid fluctuations.


set vmStats to (text 12 thru -2 of (do shell script "vm_stat | grep 'Pages free'")) * 4096

set vmStats to ("Free RAM = " & (round (vmStats / 1.0E+7)) / 100) & " GB" as text

tell application "System Events" to display dialog vmStats with title "Memory usage" buttons {"OK"} default button 1

Applescript show free memory

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.