Created
November 17, 2012 07:44
-
-
Save Quasimo/4094086 to your computer and use it in GitHub Desktop.
Revisions
-
Quasimo created this gist
Nov 17, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ -- Created By AudialRedux (c) 2011 -- v1.0 tell application "Finder" set diskName to (name of startup disk) set diskSpace to (free space of startup disk) --(*Number of bytes free.*) set diskSpace to (round (diskSpace * 1048576)) (*Changes bytes into megabytes.*) set diskCap to (capacity of startup disk) --(*Number of bytes that the disk can hold.*) set diskCap to (round (diskCap / 1048576)) set Cushion to (round (0.2 * diskCap)) --(*20% of the disk.*) set diskSpace to (diskSpace - Cushion) --(*Amount of space left in disk.*) set CurDate to ((current date) as string) end tell set status to display dialog "On: " & CurDate & return & "The drive: " & diskName & return & "Has :" & diskSpace & "MBs available." buttons {"Ok Thanks!", "Free Ram!."} with title "Free Ram v1.0 By AudialRedux 2011" default button "Free Ram!." with icon note if button returned of status = "Free Ram!." then do shell script "purge ram" do shell script "purge" delay 1.0 tell application "Dock" quit launch end tell end if display dialog "Ram Freeing Completed! 100%"