Sign in to follow this  
Followers 0
jimmer

ControlSend / ControlClick

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Use the _FF.au3 (firefox) to perform the DOM click on your object.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0