Jump to content

AutoitX MouseClickDrag function in C++


waterstoom
 Share

Recommended Posts

Hi guys,

im stuck when using the MouseClickDrag function in Visual studio. I did found the function with the method name AU3_MouseClickDrag() but im confusing by its parameter. 

Autoit Script:

MouseClickDrag ( "left", x1, y1, x2, y2, 10 )

 

But in C++

the parameter type of AU3_MouseClickDrag is AU3_MouseClickDrag(LPCWSTR,int,int,int,int,int)

my question is what should i fill in for LPCWSTR? I tried to put "left" on it but no luck T_T

Help me pls.

 

 

Link to comment
Share on other sites

  • Developers

The Helpfile states:

Quote

Parameters

button The button to click: "left", "right", "middle", "main", "menu", "primary", "secondary".
x1, y1 The x/y coords to start the drag operation from.
x2, y2 The x/y coords to start the drag operation to.
speed Optional: the speed to move the mouse in the range 1 (fastest) to 100 (slowest). A speed of 0 will move the mouse instantly. Default speed is 10.

So it should indeed be "left"

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

For the LPCWSTR type should i fill like adding a L infront?

Example:

for the "left" should i do like L"left"? cause the parameter need to fill in LPCWSTR form but not String

If its wrong can anyone correct me?

 

I did try with this code:

AU3_MouseClickDrag(L"left",60,60,10,10,20)

to drag notepad title in x:60 y:60 to the corner x:10 y:10

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...