G-Mac Posted January 24, 2008 Share Posted January 24, 2008 Hi, i saw this article on a safe sleep script so it turns it on when battery is below certain level and would love to implement it. Problem is, i have no idea what the hell to do. This is the link for the script details: (its further down at the bottom) http://db.tidbits.com/article/9115 If anyone could help me with this i would be most appreciated. Regards, G Link to comment Share on other sites More sharing options...
socal swimmer Posted January 25, 2008 Share Posted January 25, 2008 Hi, i saw this article on a safe sleep script so it turns it on when battery is below certain level and would love to implement it. Problem is, i have no idea what the hell to do. This is the link for the script details: (its further down at the bottom) http://db.tidbits.com/article/9115 If anyone could help me with this i would be most appreciated. Regards, G use applescript or a terminal script. Have it run constantly, and put it in your startup items (System preferences -> Accounts). Have it check battery level every 5 seconds or something, and then if it falls below a certain level, put it to sleep. Link to comment Share on other sites More sharing options...
G-Mac Posted January 29, 2008 Author Share Posted January 29, 2008 Ok i got to the stage were i have saved the script in a plain text file. how do i make it executable every 10 minutes. I keep reading using cron jobs. how do i set this up in as plain as possible. I've tried to read some guides but they baffle me i have no clue on programming in every shape and form. regards, G Link to comment Share on other sites More sharing options...
macprogrammer Posted March 23, 2008 Share Posted March 23, 2008 Ok i got to the stage were i have saved the script in a plain text file.how do i make it executable every 10 minutes. I keep reading using cron jobs. how do i set this up in as plain as possible. I've tried to read some guides but they baffle me i have no clue on programming in every shape and form. regards, G Is it a shell script or an AppleScript? This is step 1: If it is a shell script, take off the file extension, and find the file in Terminal. type in this: chmod +x thefilename Link to comment Share on other sites More sharing options...
~pcwiz Posted March 23, 2008 Share Posted March 23, 2008 What I do is I save it with a .sh shell extension and I use the chmod +x command as posted by macprogrammer. Link to comment Share on other sites More sharing options...
Recommended Posts