Jump to content

Help With Scripting


G-Mac
 Share

5 posts in this topic

Recommended Posts

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

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

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

  • 1 month later...
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

 Share

×
×
  • Create New...