Untitled

 avatar
unknown
plain_text
19 days ago
999 B
6
Indexable
# Установка нового значения SPI_GETMOUSEHOVERTIME
function Set-MouseHoverTime {
    param (
        [int]$newHoverTime
    )
    Add-Type @"
        using System;
        using System.Runtime.InteropServices;
        public class User32 {
            [DllImport("user32.dll")]
            public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, uint pvParam, uint fWinIni);
            public const uint SPI_SETMOUSEHOVERTIME = 0x0067;
            public const uint SPIF_UPDATEINIFILE = 0x01;
            public const uint SPIF_SENDCHANGE = 0x02;
        }
"@
    [User32]::SystemParametersInfo([User32]::SPI_SETMOUSEHOVERTIME, 0, $newHoverTime, [User32]::SPIF_UPDATEINIFILE -bor [User32]::SPIF_SENDCHANGE) | Out-Null
    Write-Output "Mouse hover time set to $newHoverTime ms"
}

$newHoverTime = 400  # Установите желаемое значение в миллисекундах
Set-MouseHoverTime -newHoverTime $newHoverTime
Editor is loading...
Leave a Comment