d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Powershell Cpu Affinity Changer.
Prev12
Closed New Topic New Poll
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Feb 25 2014 12:27pm
Quote (NeMiiSiSWL @ Feb 25 2014 02:19pm)
The game isnt sleeping the script is....
@.@

Code
$i = 0
$ary = 1..500000000

Do
{
$ary[$i]
$i=1
$Process = Get-Process Game

if($Process.ProcessorAffinity -ne 1)
{
    Write-Host "#ProcessorAffinity was not equal to 1, changing to 1."
    $instances = Get-Process Game
    foreach ($i in $instances)
    {
    $i.ProcessorAffinity=1
    sleep 2
    $time = Get-Date
    Write-Host "Diablo 2 changed to core 1 at $time"
    }
    }
    } until ($i -eq 500000000)


What i have so far.

however it still doesnt detect the core it is on, and then change it.
it just changes it no matter what.


Then what's the point of changing all your games to core 1. No matter what cores they are on, if they are using 40% cpu they will continue to use 40% cpu just all on one core. Doing this wont make your computer run any better.

Edit: My god that is some shit tier scripting. What's the point of the ridiculously large array...

This post was edited by AbDuCt on Feb 25 2014 12:29pm
Go Back To Programming & Development Topic List
Prev12
Closed New Topic New Poll