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

Dec 23, 2012 11:18 AM in response to msuper69

its the same princip. i dont leave data on my hard drive if its not need. the same with ram. if there are processes they need to much or they run but i dont need it, i clean the ram, so other programms can use the ram. lets doesnt talk about the functionality, lets talk about the script.


ahh, and they are so many programms in the mac app store and they do the same. look on the ratings. they often got good ratings.

Dec 23, 2012 12:46 PM in response to Rune Piper

The purge utility is mainly used when doing a performance analysis. As has been beaten to death in your other topics, the OS keeps track of RAM that is not being used so that it can be used by other processes as needed. Anything you do to "free" memory is going to negatively affect the system performance, since things in memory that might be used again have been removed.


All you need to do is put the results(s) from the vm_stat shell script (take a look at the manual page I have linked) into your text field. A momentary snapshot of the free memory isn't really going to do much good though (since it constantly changes), so your program should really be constantly updating the text field, which is going to involve things such as NSTask and NSPipe. A screenshot of your UI isn't going to help nearly as much as some code.

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.