Jump to content

Autosleep-Script


  • Please log in to reply
164 replies to this topic

#121
SuperHack

SuperHack

    InsanelyMac Protégé

  • Members
  • Pip
  • 39 posts
Thank's so much for this script- works perfectly! Only issue I am having is that whenever Adobe Flash is open, the computer doesn't sleep. This is not under the "Safari" program (added "Safari:100" for kicks and didn't help) but I can't add Flash Player to the main.scpt with Open RIP 10.7. Can someone help me edit the script to include Flash Player? Much appreciated!

#122
fc bayern

fc bayern

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 215 posts
  • Gender:Male
  • Location:Macedonia
KWS
Couple days ago I was using the super duper to backup my Lion osx, and before that I was copying some large files between the partitions, in both ways the script triggered the auto sleep (but in this cases it shouldn't).Isn't the script monitoring the master CPU load or?
Pls tell me how the script is programmed , this line : set CPUload to {"Finder:2"} --CPUload, it is supposed to monitor the general CPU load and above 30% from 0.2%(that is 0.26% cpu load) the script should prevent the auto sleep.
Pls tell me how can I add some application, for example super duper or whatever, How can I tell the script to monitor the finder or cpu load and above 2% of general use(not 0.2) not to trigger.
And does the script usese the original autosleep timer from system preferences?
Pls , tell me how can i implement in this script the situation when the files are copied from one to onother partition in the OSX , how to insert the line to monitor the Finder activity and above 2% use - not to trigger the auto sleep
Also isnt possible to add ability , the network traffic to be watch generally ant not only for the "downloads" folder, for example on some other partition - Im willing to insert those lines by myself, but i need your assistence in the begging.

thanks

#123
SuperHack

SuperHack

    InsanelyMac Protégé

  • Members
  • Pip
  • 39 posts

KWS
Couple days ago I was using the super duper to backup my Lion osx, and before that I was copying some large files between the partitions, in both ways the script triggered the auto sleep (but in this cases it shouldn't).Isn't the script monitoring the master CPU load or?
Pls tell me how the script is programmed , this line : set CPUload to {"Finder:2"} --CPUload, it is supposed to monitor the general CPU load and above 30% from 0.2%(that is 0.26% cpu load) the script should prevent the auto sleep.
Pls tell me how can I add some application, for example super duper or whatever, How can I tell the script to monitor the finder or cpu load and above 2% of general use(not 0.2) not to trigger.
And does the script usese the original autosleep timer from system preferences?
Pls , tell me how can i implement in this script the situation when the files are copied from one to onother partition in the OSX , how to insert the line to monitor the Finder activity and above 2% use - not to trigger the auto sleep
Also isnt possible to add ability , the network traffic to be watch generally ant not only for the "downloads" folder, for example on some other partition - Im willing to insert those lines by myself, but i need your assistence in the begging.

thanks


Use Open RIP 10.7 (attached). If you have any questions then ask but I believe you just open this and it will find the script, and follow instructions in window to edit.

Attached Files



#124
KWS

KWS

    InsanelyMac Protégé

  • Donators
  • 76 posts

Use Open RIP 10.7 (attached). If you have any questions then ask but I believe you just open this and it will find the script, and follow instructions in window to edit.

I answered already via PM ...

#125
marliwahoo

marliwahoo

    Marliwahoo

  • Members
  • PipPipPipPipPipPipPip
  • 604 posts
Works great in Lion for my Asus P5W !

Thanks !!

#126
sw170

sw170

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:UK

...
... and at last one ONLY for battery monitoring (sleep if battery power is less than 3 % (if not charging)


Hey KWS,

thanks a MILLION for both: your RIP script and real data saver BatteryMon.app

Best Wishes
swavek

#127
dysfunction

dysfunction

    InsanelyMac Protégé

  • Members
  • Pip
  • 34 posts
  • Gender:Male
  • Location:denmark
Does this work in 10.7.2?
I tried to install it, but the installer cant finish. Anyone else who have that problem?
Or is there another workaround for 10.7.2?

#128
sw170

sw170

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:UK
KWS could you please explain whats happening in your "battery check" script here:

set batt to do shell script ("ioreg -w0 -l|grep LegacyBatteryInfo")
				set oldDelims to AppleScript's text item delimiters
				set AppleScript's text item delimiters to {"Capacity\"="}
				set all2 to second text item of batt
				set AppleScript's text item delimiters to {","}
				set all to first text item of all2
				set tresh to all / 30 as integer
				set AppleScript's text item delimiters to {"Current\"="}
				set curr2 to second text item of batt
				set AppleScript's text item delimiters to {","}
				set curr to first text item of curr2
				set AppleScript's text item delimiters to oldDelims
				if tresh > curr then


I'm trying to understand it and change sleep mode from 3% to 5% and can't work that out.

Thanks in advance
s

#129
KWS

KWS

    InsanelyMac Protégé

  • Donators
  • 76 posts
tresh is 100 divided to 30 = 3,33 %-
all is your full battery capacity
You need to change to all divided to 20 = 5 %

set tresh to all / 20 as integer

Regards
KWS

#130
Dojomann

Dojomann

    Mach popcorn

  • Members
  • PipPipPip
  • 111 posts
  • Gender:Male
  • Location:Windsor, Ontario
in 10.7.2 if i have kwsleep installed, after resuming from sleep the machine waits up to a minute or so (sometimes instantly) and then puts itself back to sleep... anyone else having this issue?

#131
stefano.85

stefano.85

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 233 posts
  • Gender:Male
  • Location:Italy

in 10.7.2 if i have kwsleep installed, after resuming from sleep the machine waits up to a minute or so (sometimes instantly) and then puts itself back to sleep... anyone else having this issue?


+1 here! same exact problem, i don't know if it's related to kwsleep (that i have also installed). This happens only sometimes (maybe when i wake the system by mouse-click and not by power-button but i'm not sure about this).
Bye

#132
KWS

KWS

    InsanelyMac Protégé

  • Donators
  • 76 posts
Try as a workaround to execute a keystroke or a mouseclick directly after wake.
Possibly uda dont reset system activity, so after 30 s sleep triggers again ...

#133
sw170

sw170

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
  • Gender:Male
  • Location:UK

tresh is 100 divided to 30 = 3,33 %-
all is your full battery capacity
You need to change to all divided to 20 = 5 %

set tresh to all / 20 as integer

Regards
KWS


Thanks for clearing that out KWS, I got carried away with this problem and created my own Zarvox-lowBattery voice alert ;)
Best
swavek

#134
Dojomann

Dojomann

    Mach popcorn

  • Members
  • PipPipPip
  • 111 posts
  • Gender:Male
  • Location:Windsor, Ontario

Try as a workaround to execute a keystroke or a mouseclick directly after wake.
Possibly uda dont reset system activity, so after 30 s sleep triggers again ...


nope, doesn't seem to do it... mashing the keyboard to no avail, still goes back to sleep.. I've removed kwsleep since and it's fine, just doesn't go to sleep after a certain amount of time.

#135
KWS

KWS

    InsanelyMac Protégé

  • Donators
  • 76 posts
QUOTE (Dojomann @ Oct 21 2011, 04:24 AM)
nope, doesn't seem to do it... mashing the keyboard to no avail, still goes back to sleep.. I've removed kwsleep since and it's fine, just doesn't go to sleep after a certain amount of time.

OK, in case of sleep-problems i must say that ...

iQuit :wacko:

I'm very busy at the moment ... maybe I can continue the project sometime in the future ...

the future is already gone ... i did a quick workaround to avoid resetting system-activity ... hope it works ...

Best Regards
KWS

#136
OsXsO

OsXsO

    InsanelyMac Protégé

  • Members
  • PipPip
  • 84 posts
  • Location:Spain

OK, in case of

... sleep-problems ...

iQuit :wacko:

.. use pleasesleep or anything you prefer ...

Regards
KWS


oooooooohhhh

this are bad news... thx KWS for your work.

#137
RogerG

RogerG

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts
  • Gender:Male
Thanks KWS! Your solution worked very well for me, I used it a very long time, beginning with 10.5
A few days ago I updated my machine to 10.7.2 and I was very sad to learn that RIP does not do the job anymore :-(
Anyway, I will find a different solution, I just wanted to express my thankfulness.

Best regards
RogerG

#138
KWS

KWS

    InsanelyMac Protégé

  • Donators
  • 76 posts
I added updates for 10.7.2 on first page ... :whistle:

#139
OsXsO

OsXsO

    InsanelyMac Protégé

  • Members
  • PipPip
  • 84 posts
  • Location:Spain

I added updates for 10.7.2 on first page ... :whistle:


Great ... working again .. :) on my 10.7.2

Questions:

i have osx installed on a box as a remote server 10.6.8 using a airport extreme so i can take advantage of the bonjour proxy service.. my problem is that if i access files on the shares of the server... "playing a movie" it will sleep. so i tried to set applefileserver:1 smbd:1 and Applevncserver:1 and it looks that it keeps longer until it sleeps but i can't go smaller than 1. Kwssleep monitors downloading net traffic, maybe the easiest way would be if its possible to monitor the upload too.

anyway thx for the update

Salu2

#140
KWS

KWS

    InsanelyMac Protégé

  • Donators
  • 76 posts

Great ... working again .. :) on my 10.7.2

Questions:

i have osx installed on a box as a remote server 10.6.8 using a airport extreme so i can take advantage of the bonjour proxy service.. my problem is that if i access files on the shares of the server... "playing a movie" it will sleep. so i tried to set applefileserver:1 smbd:1 and Applevncserver:1 and it looks that it keeps longer until it sleeps but i can't go smaller than 1. Kwssleep monitors downloading net traffic, maybe the easiest way would be if its possible to monitor the upload too.

anyway thx for the update

Salu2

Maybe you should set a cpu-limit for your movie playing prog ...





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2015 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy