|
|
rest of the script
The comment form truncated the script. Here's the last part: -- Returns a list of the largest num applications on get_big_procs(num) do shell script "ps auxmww" set r to paragraphs 2 through (num + 2) of result as list set o to "" repeat with c from 1 to num set e to item c of r -- get size rounded to nearest MB set vsz to ((word 6 of e) as integer) + 512 set vsz to ((vsz - (vsz mod 1024)) / 1024) as integer set o to o & return & " " & vsz & " MB " -- extract the process name set AppleScript's text item delimiters to {""} set ao to offset of "/" in e set a to (text items ao through -1 of e) as string -- if the name contains ".app", truncate the name there. set ao to offset of ".app" in a if (ao is not 0) then set a to (text items 1 through (ao - 1)) of a as string -- extract the executable name from the process name. set AppleScript's text item delimiters to {"/"} set a to text item -1 of a set o to o & a end repeat return o end get_big_procs
Max No of App Details?
Is there anyway to increase the number of Top "n" apps? Even though I modified the variable used for the loop, it appears (for me at least) that the maximum is 7. Any ideas?
Max No of App Details?
I think the problem is that there is some upper limit to the # of characters you can send to a dialog. Try this: replace the top portion of the script (everything above 'on vmparse(x,n)') with this code:
This fragment will display one dialog if you ask for 5 or fewer apps, and two dialogs if you want more than 5. I'm also working on a version that handles UNIX command line arguments correctly.
Max No of App Details?
rather than fragment into 2 dialogs, get rid of the text section headers. that gives room for a few more apps. using my layout, i can fit 9 - 11 depending on length of the app names.
Max No of App Details?
heh. No sympathy from me - I'm using a 256mb iBook. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.22 seconds |
|