Jump to content
Sign in to follow this  
saverfixer

I can use dll files ?

Recommended Posts

saverfixer

Am sorry i am still new to autoit and i recently found out that i can somehow use dll files to do stuff they were programed for.

Can you guys give me 1 or 2 simple examples of what can be done using some kind of windows dll ?

I looked into calldll help but its a mystery to me

I also remember that there was a tool that reads dll functions so i would know their names, do u guys know about this app ?

Edited by saverfixer

Share this post


Link to post
Share on other sites
bo8ster

Have a look at the _WinAPI functions in the help file. Most are wrappers for dll calls. If you search for DllCall you will find many examples.

ok, one example is

Local $a_wfp = DllCall("user32.dll", "hwnd", "WindowFromPoint", "long", $a_mpos[0], "long", $a_mpos[1])

This does the same as calling _WinAPI_WindowFromPoint(). I would have to set up $tagPOINT with the X and Y coords before the call but i'm sure you get the idea.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
saverfixer

oh thanks

How about that tool i was talking about ?

There was a tool i had but i cant find it in my computer any more.

It was reading (i think) functions that autoit could reference to.

Do u have such tool ? or autoit can read those ?

Thanks

Oh almost forgot, from your example ? No i have no idea LOL

sorry

Edited by saverfixer

Share this post


Link to post
Share on other sites
Authenticity

Dll Export Viewer

All the dll stuff you may find around here, is considered an advanced topic for those starting with scripting, especially because they're written using C\C++ (mostly) and you need to understand topics such as function calling conventions, structure packing, data type, etc... Usually you'll find dll functions from one of Microsoft's dlls that use the standard calling syntax presented throughout the WinAPI.au3 library. Get your self Microsoft® Win32® Programmer's Reference or search the MSDN site for the function prototype and see how the same function gets called in _WinAPI_* functions. The most common dlls are user32.dll, gdi32.dll, advapi32.dll, shell32.dll, etc.. Most of these dlls functions are already wrapped by a few libraries in the Examples Forum.

Share this post


Link to post
Share on other sites
bo8ster

Authenticity pointed to the tool I had used, I couldn't remember the name. Much is possible with AutoIt but you need to understand what you are doing. If you are a quick study and you understand pointers and structures, you should be able to pick up the examples quickly. Most exposed functions (like WindowFromPoint) are well documented on MSDN, the help file has links.

$tagPOINT is a structure containing two elements, X and Y. You set the X and Y values with the mouse coords (can be done with MouseGetPos()) then send that to the _WinAPI_WindowFromPoint() function. ""long", $a_mpos[0], "long", $a_mpos[1]" is the same as $tagPOINT at that stage. _WinAPI_WindowFromPoint($tagPOINT) then returns a handle to the window the mouse is above.

Note: $tagPOINT is not exactly the same as I specify long and $tagPOINT is an int - just in case someone wants to be pedantic. It works in either case.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
saverfixer

Yep that was exactly what i had.

And yes i am a quick learner if i have someone to teach me. TO bad no one around is an autoit coder so i gotta do all my stuff on my own most of the time.

I dont even know why i started coding, but i sure dont regret it ;)

Autoit made my life easier and save me time

I have not yet got my hands on any DLL files but i just wanted to find the ways dlls can be used before i would actualy use them

Thank you all guys for helpful replies.

This is what replies should be like, instead i get replies telling how stupid i am and in the end i am the one who gets banned (but thats my other account :) )

Edited by saverfixer

Share this post


Link to post
Share on other sites
bo8ster

I would edit out the last line if I was u.

The DLLs Authenticity mentioned are all on ur Windows machine. You already have them.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites
saverfixer

what is wrong with my last line ?

Seriously i want to know. Did i say a bad word or told someone to go to hell ?

Confused ;)

Looks like i am about to get my self a warning ? But for what ? :)

Edited by saverfixer

Share this post


Link to post
Share on other sites
wraithdu

This is what replies should be like, instead i get replies telling how stupid i am and in the end i am the one who gets banned (but thats my other account :) )

You got banned and created another account. That's called ban evasion. You can wave bye bye very soon.

Edited by wraithdu

Share this post


Link to post
Share on other sites
Jos

This is what replies should be like, instead i get replies telling how stupid i am and in the end i am the one who gets banned (but thats my other account :) )

I knew you were pretty dumb when we had our first encounter but now you really topped yourself on the stupidity scale.

microbious, Ban evasion is not allowed in this forum so consider yourself banned permanently.

Jos


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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×