waterstoom Posted December 19, 2017 Share Posted December 19, 2017 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 More sharing options...
Developers Jos Posted December 19, 2017 Developers Share Posted December 19, 2017 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 More sharing options...
waterstoom Posted December 19, 2017 Author Share Posted December 19, 2017 i tried to put "left" to drag a program to the corner but the problem is it does not make a left click i can only see the movement of the cursor Link to comment Share on other sites More sharing options...
aa2zz6 Posted December 19, 2017 Share Posted December 19, 2017 2 hours ago, waterstoom said: i tried to put "left" to drag a program to the corner but the problem is it does not make a left click i can only see the movement of the cursor If you're trying to relocate the position of a program wouldn't the WinMove function be more beneficial? https://www.autoitscript.com/autoit3/docs/functions/WinMove.htm Link to comment Share on other sites More sharing options...
waterstoom Posted December 20, 2017 Author Share Posted December 20, 2017 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 More sharing options...
waterstoom Posted December 20, 2017 Author Share Posted December 20, 2017 haha its indeed the L"left" it just after compiling the file, i need to run the .exe as admin. if not window wont allow it to move the program Earthshine 1 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