Page 1 of 3

RainGame

Posted: November 15th, 2011, 10:51 am
by jsmorley
If you are going to be playing a full screen game that you would like to give 100% of Windows resources to when playing, it can be useful to have a way to turn Rainmeter off when you start playing and and back on when you are done.

This little addon will take care of this for you. Just run it before you start your game, and it will exit Rainmeter and put a little icon in the system tray. When you are done, just click the icon and select "Restart Rainmeter".

The application can be run from any location.
RainGame.zip

Re: RainGame

Posted: November 16th, 2011, 6:24 am
by Matt
Works like a charm! :thumbup:

Re: RainGame

Posted: November 16th, 2011, 12:54 pm
by jsmorley
Matt wrote:Works like a charm! :thumbup:
Good deal. I just wanted a way to give Skyrim all the cycles I could.. ;-)

Re: RainGame

Posted: November 17th, 2011, 5:14 pm
by AlC
Thank you very much for it

Now I've done my first experience with AutoIt to make it automatic, just too lazy to go to the icon :)

With adding ( and I'm proud of it :D )
If NOT ProcessExists("notepad++.exe") Then
ShellExecute("..\..\Rainmeter.exe")
Exit
EndIf

With Example exe Notepad++
Thanks

Re: RainGame

Posted: November 17th, 2011, 5:19 pm
by jsmorley
Yeah, you could certainly do that and put "mygme.exe" as the process to watch for...

Re: RainGame

Posted: November 20th, 2011, 4:25 pm
by Mordasius
jsmorley wrote:I just wanted a way to give Skyrim all the cycles I could.. ;-)
Every little helps even though Skyrim seems to be very tolerant and perform surprisingly well on lower spec systems. In addition to closing down Rainmeter and your antivirus, you might just as well apply a few Skyrim.ini tweaks along the lines of those listed in Step 5 of these tips.

That done, why not add a Rainmeter logo to your Krosis mask?
Untitled-2.jpg

Re: RainGame

Posted: December 8th, 2011, 9:43 pm
by oliverheath2000
I am struggling! Where do you put the extra code that makes rainmeter close automatically upon launching a game?

Thanks in advance

Re: RainGame

Posted: December 27th, 2011, 12:48 pm
by santa_ryan
You could detect if a window was topmost and kill rainmeter that way as well. All games that I know of have the "Topmost" attribute applied to them (minus simple things like minesweeper and solitaire).

Use the following includes:

Code: Select all

#include <WinAPI.au3>
#include <constants.au3>
If you don't want the constants.au3 include then declare these:

Code: Select all

$GWL_EXSTYLE = 0xFFFFFFEC
$WS_EX_TOPMOST = 0x00000008
Here's how to do it:
Returns true if $hWnd has the topmost attribute and false if $hWnd is does not, assuming $hWnd is you're program handle.

Code: Select all

BitAND(_WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE), $WS_EX_TOPMOST)
Example of skyrim detection:

Code: Select all

Do
     Global $Skyrim = WinGetHandle("Skyrim")
     If BitAND(_WinAPI_GetWindowLong($Skyrim, $GWL_EXSTYLE), $WS_EX_TOPMOST) Then
          ProcessClose("Rainmeter.exe")
     EndIf
     Sleep(10000)
     ;Sleep so we don't kill the CPU...
Until 1
I'll make a script that will do what I just explained, but this will take me a bit longer.

Re: RainGame

Posted: December 27th, 2011, 4:37 pm
by santa_ryan
Alrighty. Done

http://rainmeter.net/forum/viewtopic.php?f=18&t=10810

Edit: Sorry for the double post. I know that double posting is bad form. :/ Merge this with my last comment if you could please.

Re: RainGame

Posted: April 12th, 2012, 9:04 am
by sea1monkey2
Or, I did something to make it easily accessible but still out of the way. Just throw this little line into your Rainmeter.ini

Code: Select all

TrayExecuteM=!Execute ["M:\Program Files\Rainmeter\Addons\RainGame\RainGame.exe]
Streamlined is fun :thumbup: and thanks jsmorley

EDIT: And then I realized I just revived a dead horse :handtohead: