Jump to content

Recommended Posts

Hey there guys I'm trying to call a Dll, Im getting error 4 which appears to be error for parameters, this funcs takes the mouse and moves it to the params, and yes ik i can do this with a func and mousemove but my objetive here its understand how to use dllcall and where im failing,

;int MouseClick(const HWND hwnd, const RECT rect, const MouseButton button, const int clicks, const HWND restore_focus, const POINT restore_cursor);

DllCall("mouse.dll","int","MouseClick",$hActive,808, 421,945, 555,1,1) ;my code, which returns a 4,

 

thanks for your help!

Link to post
Share on other sites

Want to learn how to add and use Dynamic libs into my projects. Not interested in the mouse movement at all, I've seen that Dll's add alot of functionality so yeah.

btw i think im commiting an error on the params... that's what got me confussed not only in this kind of dll, but in any even on the simpler ones.

 

thanks in regards

 

Link to post
Share on other sites
  • Developers

You will have to look at the parameters and what is expected there. e.g. "const RECT rect" is not a simple value but a STRUCT.

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 post
Share on other sites
On 11/19/2020 at 7:18 AM, Jos said:

You will have to look at the parameters and what is expected there. e.g. "const RECT rect" is not a simple value but a STRUCT.

Jos

grettings Jos!

If I'm not wrong I should declare the struct with dll funcs then use it?

May I have an example for this case?

Thanks for your help.

Edited by TylerDurd3n
Everything was in the quote.
Link to post
Share on other sites
  • Developers

Have you checked the Helpfile and these forums for the many examples? 
The information is there so it is up to you to give it a start and come back with some code when you have issues. ;) 

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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...