Jump to content

Set mouse properties...


Neoborn
 Share

Recommended Posts

Hello Guys,

I have made a little app that sets the settings I want when I launch it but I need it to check to see if the check box is checked and if not to make sure it is. I have made this up to this point but the checking is something I found difficult. Apparently this value can be found out with Winspy tool but not having alot of luck with it....anyhelp?

#Include<File.au3>

Opt("WinTitleMatchMode")

While 1
    MouseSpeed()
    Sleep(1000)
WEnd
;=======================================Functions================================;
Func MouseSpeed()
    If ProcessWait("UT2004.exe") Then
        ProcessWaitClose("UT2004.exe")
        Run(@ComSpec & " /c " & 'main.cpl', "", @SW_HIDE)
        WinWait("Mouse Properties")
        WinActivate("Mouse Properties")
        Send("+{Tab}")
        Send("{Right 2}{Tab}")
        Send("{Right 5}")
        Send("!a")
        Send("{Esc}")
    EndIf
EndFunc

~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Link to comment
Share on other sites

#include <GuiSlider.au3>
Run(@ComSpec & ' /c control main.cpl,@0,2', '', @SW_HIDE)
WinWait("Mouse Properties", "Pointer Options")
$h_slider = ControlGetHandle("Mouse Properties", "Pointer Options", "msctls_trackbar321")
_GUICtrlSliderSetPos($h_slider, _GUICtrlSliderGetRangeMax($h_slider))
If Not ControlCommand("Mouse Properties", "Pointer Options", "Button2", "IsChecked", "") Then
    ControlCommand("Mouse Properties", "Pointer Options", "Button2", "Check", "")
EndIf
ControlClick("Mouse Properties", "Pointer Options", "Button11")
ControlClick("Mouse Properties", "Pointer Options", "Button9")

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

#include <GuiSlider.au3>
Run(@ComSpec & ' /c control main.cpl,@0,2', '', @SW_HIDE)
WinWait("Mouse Properties", "Pointer Options")
$h_slider = ControlGetHandle("Mouse Properties", "Pointer Options", "msctls_trackbar321")
_GUICtrlSliderSetPos($h_slider, _GUICtrlSliderGetRangeMax($h_slider))
If Not ControlCommand("Mouse Properties", "Pointer Options", "Button2", "IsChecked", "") Then
    ControlCommand("Mouse Properties", "Pointer Options", "Button2", "Check", "")
EndIf
ControlClick("Mouse Properties", "Pointer Options", "Button11")
ControlClick("Mouse Properties", "Pointer Options", "Button9")
How did you get the button names etc with the tool that comes with autoit or windowspy? Thanks I will check this out. I would love to know how you came up with this because obviously your way is a better way.

~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Link to comment
Share on other sites

How did you get the button names etc with the tool that comes with autoit or windowspy? Thanks I will check this out. I would love to know how you came up with this because obviously your way is a better way.

The one that comes with autoit.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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...