|
|
Pause and resume resource-intensive apps via script
Thanks for the hint. But how do I save it as a file, I'm pretty new at this scripting thing. Script Editor gives me the Syntax error: "an unknown token can't go there," and I can't seem to save the file.
Pause and resume resource-intensive apps via script
You should just use a text editor, and save the file as plain text (with the ".pl" extension). Then you will need to make the script executable from the terminal using chmod +x scriptname.
Pause and resume resource-intensive apps via script
you can save the third (annotated) version above as an executable file like this:
highlight all the text and select copy. Open up a terminal windows and type:
Now it's ready to run by typing:
where those numbers are the process ID and the hi-lo load limits on the application you want to limit. use top or activity monitor to find the process ID.
Another way that might be slightly easier is to add this to your to do this copy the second form above (the one that starts with "alias supernice ...). grab all the lines in one selection. If possible select carriage returns before and after it, though this is not essential. select "copy", then open a terminal window and type:
note the double "greater than" symbols, the tilde and the period. Now close that terminal window and open a new one (to force it to re-initialize). At this point you should be able to try
and have it supernice process ID 3347 for example. Notice that in this form you don't need to specify the ".pl" suffix or the "./" prefix, since this is now a built-in alias command, not a script file. It can be run from any subdirectory, not just the directory where the script file was located.
to remove the alias if you do something wrong or simply don't like it, open the .bashrc and .cshrc in any text editor and delete the offending line. To open a hidden dot file in TextEdit you can type:
Pause and resume resource-intensive apps via script
Alternatively see the applescript version I posted below |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 daysNo new commentsLinks 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.17 seconds |
|