It is currently April 27th, 2024, 12:54 am

Lano Visualizer - computer can't auto-sleep

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Lano Visualizer - computer can't auto-sleep

Post by jsmorley »

balala wrote: Yes, I thought but couldn't find quickly a better expression.
Well, it's "bug'ish"... ;-)
GLing
Posts: 23
Joined: July 1st, 2015, 5:05 pm

Re: Lano Visualizer - computer can't auto-sleep

Post by GLing »

As a temp workaround you could use the code below to disable the visualizer if your music player is not running.

Code: Select all

[Rainmeter]
Update=1000

[UnloadIfNotPlaying]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=CAD
PlayerType=STATUS
IfMatch=0
IfMatchAction=[!DeactivateConfig "Lano Visualizer\Visualizer"]
IfNotMatchAction=[!ActivateConfig "Lano Visualizer\Visualizer"]

[RequiredMeter]
Meter=String
Disabled=1
Text=""
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Lano Visualizer - computer can't auto-sleep

Post by jsmorley »

Or you could turn off "auto sleep" in your power settings in Windows and use:

[MeasureI'mSleepy]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IDLE_TIME
IfAboveValue=1800
IfAboveAction=[rundll32.exe PowrProf.dll,SetSuspendState 0,1,0]
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lano Visualizer - computer can't auto-sleep

Post by balala »

GLing wrote:As a temp workaround you could use the code below to disable the visualizer if your music player is not running.
This is a very good solution. I would have had to think about it, but I didn't, so thanks for your suggestion.
jsmorley wrote:Or you could turn off "auto sleep" in your power settings in Windows and use:
Personaly for me this isn't a good solution, because I often leave my computer and I like if it can enter to sleep mode.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Lano Visualizer - computer can't auto-sleep

Post by jsmorley »

balala wrote: Personaly for me this isn't a good solution, because I often leave my computer and I like if it can enter to sleep mode.
But it will. After 1/2 hour of inactivity. I'm just moving the auto-sleep from Windows to Rainmeter.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Lano Visualizer - computer can't auto-sleep

Post by jsmorley »

Anyway, it was just a thought. It has some disadvantages. It is entirely based on mouse and / or keyboard input, so unlike the Windows "auto-sleep" that is more intelligent, it would go to sleep while you were sitting back and watching a movie on your PC after a half-hour.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lano Visualizer - computer can't auto-sleep

Post by balala »

jsmorley wrote:But it will. After 1/2 hour of inactivity. I'm just moving the auto-sleep from Windows to Rainmeter.
Yes, you're right I think I wasn't attentive enough. But this is also an interesting solution.
Using the same feature of Rainmeter, I had a "screensaver" skin a while ago.
jsmorley wrote:Anyway, it was just a thought. It has some disadvantages. It is entirely based on mouse and / or keyboard input, so unlike the Windows "auto-sleep" that is more intelligent, it would go to sleep while you were sitting back and watching a movie on your PC after a half-hour.
As we all know Rainmeter can't and, I think, don't even want to replace the features of the os.
valentine1
Posts: 13
Joined: May 29th, 2012, 10:54 pm

Re: Lano Visualizer - computer can't auto-sleep

Post by valentine1 »

jsmorley wrote:Or you could turn off "auto sleep" in your power settings in Windows and use:

[MeasureI'mSleepy]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IDLE_TIME
IfAboveValue=1800
IfAboveAction=[rundll32.exe PowrProf.dll,SetSuspendState 0,1,0]
This is a very clever workaround, I like it. Thank you! (and thank you too, GLing)
jsmorley wrote:Anyway, it was just a thought. It has some disadvantages. It is entirely based on mouse and / or keyboard input, so unlike the Windows "auto-sleep" that is more intelligent, it would go to sleep while you were sitting back and watching a movie on your PC after a half-hour.
For me this will work; having multiple monitors means that I almost never 'just' watch a movie for an hour without moving the mouse/using the keyboard. I think I can live with the very occasional suspend during movie times.

I do however have one last question...

"IfAboveAction=[rundll32.exe PowrProf.dll,SetSuspendState 0,1,0]" actually hibernates my computer - is there a similar function for the Windows 7 sleep mode? Sleep mode puts your work and settings in memory and draws a small amount of power, hibernation puts your open documents and programs on your hard disk, and then turns off your computer. This is definitely doing the latter - tested it with IfAboveValue=15 and it sure works! I use sleep mode to ensure my hard drives aren't constantly spinning but can wake and use the PC in about 1 second after using the mouse. That hibernation took about 45 seconds to come back to life, complete with a windows startup/resume.

I did check here but I don't think it's right!
http://forum.rainmeter.net/viewtopic.php?p=100230#p100230

Not complaining though - if this is to be the fix then I'd rather use this workaround than not have any visualiser!

Thanks again guys :)
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Lano Visualizer - computer can't auto-sleep

Post by balala »

valentine1 wrote:"IfAboveAction=[rundll32.exe PowrProf.dll,SetSuspendState 0,1,0]" actually hibernates my computer - is there a similar function for the Windows 7 sleep mode? Sleep mode puts your work and settings in memory and draws a small amount of power, hibernation puts your open documents and programs on your hard disk, and then turns off your computer. This is definitely doing the latter - tested it with IfAboveValue=15 and it sure works! I use sleep mode to ensure my hard drives aren't constantly spinning but can wake and use the PC in about 1 second after using the mouse. That hibernation took about 45 seconds to come back to life, complete with a windows startup/resume.

I did check here but I don't think it's right!
http://forum.rainmeter.net/viewtopic.php?p=100230#p100230
This command will sleep the computer only if you've disabled the hibernation. Otherwise it will hibernate it.
An alternative way, which is always working, would be to use the NirCmd little app, available here. If you want to try it, download it and use a this kind of command: IfAboveAction=["#@#nircmd.exe" "standby"] (obviously you have to copy the downloaded nircmd.exe into the @Resources folder).
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Lano Visualizer - computer can't auto-sleep

Post by fonpaolo »

I can suggest you to use NirCmd, then you don't have to worry if hibernation is enabled or not, choose to enable NirCmd to put your computer to sleep and also use hibernate when you need it.

As a side note, there is a version for 32 and a 64 bit of this program.