Jump to content

Recommended Posts

Posted (edited)

Is there a way I can simulate moving the mouse wheel on a minimized window?

Also, is there something I can do so the autoit icon never shows in the system tray? i have opt("TrayIconHide", 1) but it still pops up for a split second.

EDIT: I actually did some work and made a function that does it. Credit to Insolence for his _MouseClickPlus function that helped me make this and Larry for the _MakeLong function it uses.

Func _MouseWheelPlus($Window, $direction, $clicks)
    Local $WM_MOUSEWHEEL    =  0x020A
    $MouseCoord = MouseGetPos()
        $X = $MouseCoord[0]
        $Y = $MouseCoord[1]
    If $direction = "up" then
        $WheelDelta = 120
    Else
        $WheelDelta = -120
    Endif
    For $i = 0 to $clicks
    DllCall("user32.dll", "int", "SendMessage", _
            "hwnd",  WinGetHandle( $Window ), _
            "int",   $WM_MOUSEWHEEL, _
            "long",   _MakeLong(0,$WheelDelta), _
            "long",  _MakeLong($X, $Y))
    Next
EndFunc

Func _MakeLong($LoWord,$HiWord)
  Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF))
EndFunc
Edited by Oxin8
Posted

Placing this at the start of your script will prevent the tray icon from showing initially:

#NoTrayIcon
  • Moderators
Posted

does anyone have any ideas? can this even be done with autoit or do i need to find something else to do it?

I wouldn't even know how to test if that worked or not. What are you needing it for?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

  • Moderators
Posted

Good Job... thought you might be able to manipulate that a bit.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
  • Recently Browsing   0 members

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