Oxin8 Posted January 1, 2006 Share Posted January 1, 2006 (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 January 2, 2006 by Oxin8 ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
LxP Posted January 1, 2006 Share Posted January 1, 2006 Placing this at the start of your script will prevent the tray icon from showing initially: #NoTrayIcon Link to comment Share on other sites More sharing options...
Oxin8 Posted January 1, 2006 Author Share Posted January 1, 2006 Thanks very much for that. Any ideas to solve the main problem? ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Oxin8 Posted January 1, 2006 Author Share Posted January 1, 2006 does anyone have any ideas? can this even be done with autoit or do i need to find something else to do it? ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 1, 2006 Moderators Share Posted January 1, 2006 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. Link to comment Share on other sites More sharing options...
Oxin8 Posted January 2, 2006 Author Share Posted January 2, 2006 On winamp, the mouse wheel adjusts the volume and i wanted to know if i could do it while the window is minimized. I know i can change the volume other ways but i wanted to do it with the wheel if it was possible. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 2, 2006 Moderators Share Posted January 2, 2006 Maybe you can do it with MouseClickPlus() ... http://www.autoitscript.com/forum/index.php?showtopic=7112# 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. Link to comment Share on other sites More sharing options...
Oxin8 Posted January 2, 2006 Author Share Posted January 2, 2006 Made a function that does it and added it to the top post. ~My Scripts~ *********_XInput UDF for Xbox 360 ControllerSprayPaint_MouseMovePlus Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 2, 2006 Moderators Share Posted January 2, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now