Jump to content

ControlSend / ControlClick


jimmer
 Share

Recommended Posts

Is there anyway for me to use MouseClickDrag or MouseWheel through ControlClick or ControlSend?

Been trying to test it out but I can't seem to figure out if it's possible or if I will need the physical cursor present for those commands.

Edited by jimmer
Link to comment
Share on other sites

Actually what it sounds like you are after is as simple as:

AutoItSetOption ("MouseCoordMode" ,1)
WinWaitActive("My Program")
MouseMove(1009, 336)
MouseWheel("down", 50)

You don't have a sample of your code, so I am not sure what the Title would be for the 'WinWaitActive()' command. Regardless open up AutoIt Window Info. Figure the cords of the control you are trying to interact with and if your users are going to be moving your window around on screen. Then set 'AutoItSetOption("MouseCoordMode" ,0)' or set the param to '2'. Do the MouseMove command then MouseWheel.

Without more info, not much else we can do. 

Link to comment
Share on other sites

This is what I am using for mouse clicks.

$handle = WinGetHandle("FireFox", "")
ControlClick($handle,"","","",1,x,y)

What I am trying to accomplish is for the window to use the mouse wheel while minimized, or would it need the cursor present for the task?

Edited by jimmer
Link to comment
Share on other sites

FireFox was just one of the applications. Is there something that is more universal?

I know that 

ControlClick("","","","BUTTON,clicks,x,y)

but BUTTON seems to only be Left Click, Right Click, Middle Click. But it doesn't have WheelUp or WheelDown.

 
I am wondering if there is any sort of MouseWheel that can be sent to a window that isn't focused with the use of the ControlClick or ControlSend?
 
Edit: Upon further reading, I realize it is not possible to MouseClickDrag without changing focus. I am still hopeful that I can use MouseWheel.
 
Is anyone able to verify this is not possible? I need closure.
Edited by jimmer
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...