Win: Batchscript für Maus Cursorgeschwindigkeit?


13.10.2021, 21:47

P.S.: Muss kein Batch sein, PowerShell oder ähnliches ist auch okay

3 Antworten

Das Thema hatte ich bereits letzten Monat.

Dazu hatte ich auch eine kleine Batch zum ändern der Mausgeschwindigkeit geschrieben.

MouseSpeed.cmd

@echo off
  rem Zahlen von 1 bis 20 erlaubt! default ist 10.
set "MouseSpeed=10" 
powershell "Add-Type -Memberdefinition '[DllImport("""user32.dll""")]public static extern Boolean SystemParametersInfo(UInt32 uiAction,UInt32 uiParam,IntPtr pvParam,UInt32 fWinIni);' -Namespace WinUser -Name Tools;[WinUser.Tools]::SystemParametersInfo(113, 0, %MouseSpeed%, 0)>$null"

Woher ich das weiß:eigene Erfahrung – Ich mach das seit 30 Jahren

hellomthrfckr 
Beitragsersteller
 13.10.2021, 23:03

nice, danke

@echo off
set "MouseSpeed=10" 
powershell "Add-Type -Memberdefinition '[DllImport("""user32.dll""")]public static extern Boolean SystemParametersInfo(UInt32 uiAction,UInt32 uiParam,IntPtr pvParam,UInt32 fWinIni);' -Namespace WinUser -Name Tools;[WinUser.Tools]::SystemParametersInfo(113, 0, %MouseSpeed%, 0)>$null"
Woher ich das weiß:Hobby – Ich habe schon mit 4 einen Computer bekommen.

@echo off

:loop

rem Setze Mausempfindlichkeit auf 1

powershell -Command "Add-Type -TypeDefinition '[DllImport(\"user32.dll\")] public static extern bool SystemParametersInfo(int action, int param, IntPtr vparam, int init);' -Name MouseTools -Namespace WinAPI; [WinAPI.MouseTools]::SystemParametersInfo(113, 0, [IntPtr]1, 0)"

timeout /t 1 /nobreak >nul

rem Setze Mausempfindlichkeit auf 20

powershell -Command "Add-Type -TypeDefinition '[DllImport(\"user32.dll\")] public static extern bool SystemParametersInfo(int action, int param, IntPtr vparam, int init);' -Name MouseTools -Namespace WinAPI; [WinAPI.MouseTools]::SystemParametersInfo(113, 0, [IntPtr]20, 0)"

timeout /t 1 /nobreak >nul

goto loop


Snowwwwi  16.12.2024, 11:50

@echo off

:loop

rem Setze Mausempfindlichkeit auf 1

powershell -Command "Add-Type -TypeDefinition '[DllImport(\"user32.dll\")] public static extern bool SystemParametersInfo(int action, int param, IntPtr vparam, int init);' -Name MouseTools -Namespace WinAPI; [WinAPI.MouseTools]::SystemParametersInfo(113, 0, [IntPtr]1, 0)"

timeout /t 1 /nobreak >nul

rem Setze Mausempfindlichkeit auf 20

powershell -Command "Add-Type -TypeDefinition '[DllImport(\"user32.dll\")] public static extern bool SystemParametersInfo(int action, int param, IntPtr vparam, int init);' -Name MouseTools -Namespace WinAPI; [WinAPI.MouseTools]::SystemParametersInfo(113, 0, [IntPtr]20, 0)"

timeout /t 1 /nobreak >nul

goto loop

Snowwwwi  16.12.2024, 11:55
@Snowwwwi

@echo off

:Start

powershell -Command "Add-Type -MemberDefinition '[DllImport(\"user32.dll\")]public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, uint pvParam, uint fWinIni);' -Namespace WinUser -Name Tools;[WinUser.Tools]::SystemParametersInfo(113, 0, 1, 0) > $null"

powershell -Command "Add-Type -MemberDefinition '[DllImport(\"user32.dll\")]public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, uint pvParam, uint fWinIni);' -Namespace WinUser -Name Tools;[WinUser.Tools]::SystemParametersInfo(113, 0, 20, 0) > $null"

goto Start