youknowwho4eva Posted July 17, 2008 Share Posted July 17, 2008 I'm wondering, is there a way to detect when the mouse changes to a certain cursor to do something. For example, in my CAD software when you go over the Model Space the cursor becomes Cross Hairs. I want it to perform an action when and only when the cursor changes to the Cross hairs. Giggity Link to comment Share on other sites More sharing options...
abb Posted July 17, 2008 Share Posted July 17, 2008 Take a look at MouseGetCursor() in the help file. While 1 $foo = MouseGetCursor() Select Case $foo = 3; Crosshairs ; Perform desired action ExitLoop Case Else ; error handling EndSelect Sleep(5); reduce cpu load WEnd Link to comment Share on other sites More sharing options...
youknowwho4eva Posted July 17, 2008 Author Share Posted July 17, 2008 ah thank you, I tried looking up somethings but didn't get the results I was looking for (probably more likely that i didnt understand that it was what I was looking for) I had to change it to 0, I'm guessing because its a app specific cross hair. now I need it to move attention to where the mouse is, without clicking. Is that possible? Giggity Link to comment Share on other sites More sharing options...
abb Posted July 17, 2008 Share Posted July 17, 2008 Be aware that MouseGetCursor() = 0 is unknown so you may trigger the action even if the cursor is not a crosshair.now I need it to move attention to where the mouse is, without clicking.You can get the x,y coords of the mouse if that's what you mean. See MouseGetPos() in the Help file. Link to comment Share on other sites More sharing options...
youknowwho4eva Posted July 17, 2008 Author Share Posted July 17, 2008 Yes, I understand that, but I don't see another on the list that would work. and I don't want the cordinants of the mouse, In the CAD program every button on the mouse has a set task, but the only way to bring attention to model space is to click in the model space, which will activate the assigned task (dont want to do that). I didn't know if there was a way for autoit to activate the model space when it saw the cross hairs without actually clicking in the model space. Giggity Link to comment Share on other sites More sharing options...
abb Posted July 17, 2008 Share Posted July 17, 2008 I do not believe AutoIT can do that natively however you could use AutoIT and COM to activate the model space. Link to comment Share on other sites More sharing options...
youknowwho4eva Posted July 17, 2008 Author Share Posted July 17, 2008 I'm thinking if I set it to send say ctrl rightclick, that it will activate it and not perform a task, unless someone out there has a task set to ctrl rightclick. (I know I don't, but others like to have their mouse set to do everything) Giggity 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