fmen Posted December 12, 2005 Share Posted December 12, 2005 I did a search of the help file as well as the forum with no results. Is there a way that I can capture an up or down mouse scroll like you can capture a mouse click using _IsPressed? I would like to use the scrolling activity as means of focusing on that particular window. Any help would be appreciated. Link to comment Share on other sites More sharing options...
Methos Posted December 12, 2005 Share Posted December 12, 2005 I did a search of the help file as well as the forum with no results.Is there a way that I can capture an up or down mouse scroll like you can capture a mouse click using _IsPressed?I would like to use the scrolling activity as means of focusing on that particular window. Any help would be appreciated.Hrm, I'm slightly confused, doesnt the window have to be active for the mousewheel to affect it? I'm not sure how to do what you are looking for, maybe we can suggest another method or idea if we know more of what you are trying to do though! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 12, 2005 Moderators Share Posted December 12, 2005 I think he's trying to accomplish what happens if your using SciTe, and you hold shift and scroll with the middle mouse button. It zooms in and out. Maybe Jdeb knows the answer to this one. Sorry I don't have the solution, I was only trying to reitterate what I understood your post to be, please correct me if I'm wrong. 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...
fmen Posted December 13, 2005 Author Share Posted December 13, 2005 (edited) Thanks for the answers. Let me clarify. I work daily with a program that has two frames in its main window. The programmers were sloppy. It takes two clicks on the main frame in order for it to comes into focus. It is counterintuitive. By the end of the day, I may make a thousand unnecessary clicks. I hate that. Wouldn't it be great if I could use the scrolling feature to focus the page. In other words, move the mouse over the main frame, scroll and focus. Anyway, I found a better way of doing it. While 1 $i = MouseGetPos() If WinActive ("Program") AND $i[0] > 294 Then ControlFocus ("Program", "", "TRichEdit1") Sleep (10) Wend In other words, every time the mouse moves over the border of the two frames ($i[0] > 294) focus goes to the main frame. Isn't that elegant? For a newbie I am pleased. Edited December 13, 2005 by fmen Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 13, 2005 Moderators Share Posted December 13, 2005 Good job, I saw the word focus in this last post and immediately thought of ControlFocus() 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