Jump to content

Need help with script


Recommended Posts

Ok I don't have any script, lol... because I have no idea how.

I want it to do

start > settings > control panel > mouse > wheel (tab)

"Roll the wheel one notch to scroll"

(o) The following number of lines at a time: [ 1]

(_) One screen at a time

I want it to change from [ 1] to [ 6]

Thanks.

Link to comment
Share on other sites

I used a program from Sysinternals and the Control Panel > Mouse - found these keys:

RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WheelScrollLines", "REG_SZ", "6");scroll 6 lines
RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop", "WheelScrollLines", "REG_SZ", "-1"); scroll 1 page

Edit: It looks like it won't take effect without updating UserParameters somehow.

This opens the control panel applet:

Run("rundll32.exe shell32.dll,Control_RunDLL main.cpl @0")
Edited by Squirrely1

Das Häschen benutzt Radar

Link to comment
Share on other sites

Probably the code you need is a DllCall or a WMI script, because just changing the values as they exist in the registry doesn't apply the changes immediately, but probably only after a reboot.

Das Häschen benutzt Radar

Link to comment
Share on other sites

Make a DLLCall to SystemParametersInfo with

GLOBAL CONST $SPI_SETWHEELSCROLLLINES = 105

   $SPIF_UPDATEINIFILE = 0x1
   $SPIF_SENDWININICHANGE = 0x2
   $SPIF_SENDCHANGE = $SPIF_SENDWININICHANGE

$WHEEL_PAGESCROLL = 4294967295 ; Use this, if you want scroll one Screen at a time

$linesToScroll = 6 ; Here come the lines

         $err = DllCall("user32.dll", "int", "SystemParametersInfo", _
            "int", $SPI_SETWHEELSCROLLLINES, _
            "int", $linesToScroll, _
            "int", 0, _
            "int", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDWININICHANGE))
            
            If @error <> 0 Then
                MsgBox( 4096, "Dll Error!!!", "There was an error making the Dll call." & @CR & "Error Code: " & @error )
            EndIf

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...