Apple’s Worldwide Developers Conference to kick off June 10 at 10 a.m. PDT with Keynote address

The Keynote will be available to stream on apple.com, the Apple Developer app, the Apple TV app, and the Apple YouTube channel. On-demand playback will be available after the conclusion of the stream.

Developer Forums relocated!

Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.

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 ID.