Sign in to follow this  
Followers 0
TomWolfstein

Writing a .dll of sorts

10 posts in this topic

Hi.

I hope this is the right forum for this.

I have a program which i need to build a testing suite for.

Most of the testing is done via the applications GUI, so AutoIt does a pretty good job.

What I want to do is to create a file which has all the functuons I want so i can use the through the AutoItX in .NET.

I need help doing two things (for starters). First is exactly how do I create such a file and use it in .NET.

Second is can I somehow create something that will display function data in visual studio i.e. what the function returns, short description, etc.

10x :)

Share this post


Link to post
Share on other sites



I am sure someone here has something he can contribute to help me.

Thanks again

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I don' t understand your question. Most AutoIt3 functions are available through AutoIt3X.dll which can be used in .net

Maybe I am missing your point here. :)

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I don' t understand your question. Most AutoIt3 functions are available through AutoIt3X.dll which can be used in .net

Maybe I am missing your point here. :)

I'll try to clarify.

I am writing some functions of my own to use in testing the application I mentioned before.

What I want to do is to write a file which contains these functions, and then use these function from my C# app.

I need some guidance on how to do that (structure of .au3 file, refrences from the visual studio, anything you think neccessary)

I hope it's clearer now.

10x

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

@TomWolfStein

This shows you how to create your own COM objects which you can reuse in other COM applications.

Maybe this can get you going. This explains how to do it.

Enjoy !!

regards

ptrex

Forget something here ptrex :) ? :)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Forget something here ptrex :) ? :)

I suppose he meant the link he shows in his signature

"Creating COM objects without a need of DLL's "


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

@ptrex:

Thanks for the link, I think it's a step in the right direction for me, but I still have some questions (I am kind of new to AutoIt and scripting in general so bear with me :) ).

What I wanted to do is use the functions in the file from withing my C# app. I read the AutoItX help and couldn't really find any answers there.

This might just be a problem of my being a newbie, but I cant understand from your examples how to use my file from within the .NET app.

Lets say for example that I created a file that has 2 functions in it:

run() - whoch starts the process, setUser() - which sets the username. How can I call these functions from my C# app?

I could of course just write all the functions again in C# using the AutoItX, but i'd rather not do the work again but learn something new.

Another thing is, I am guessing the XML tags are for the intelisense feature. Is there anything that can make these tags for me?

I hope I am not mixing too many things here. As you can guess this subject is not entirely clear to me :-)

10x

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

@TomWolfstein

Hi again.

Sorry that I can't explain more than what is in my examples. It is too complex to just explain this concept in a few lines.

So best is that you take the time to plough through the examples, and try to understand how it all works.

But in a nutshell this will clarify the concept.

First you create a WSC COM file. In this file you refer to the AU3 UDF file you have created to interact with.

Then WSC uses VBScript and Stdin/out to do the handshake between the AU3 and the COM object you created (= WSC file).

Once you this going and see that these interact with each other.

You can reuse these AU3 functions which you created in any COM compliant language. Like .NET, like C#, etc.

I hope this can help you understand what it is about.

regards

ptrex

Edited by ptrex

Share this post


Link to post
Share on other sites

@ptrex

Thanks for all your help. I didn't realize the subject was so complex. I thought this would be a popular demand :-)

I'll start going through the examples more extensively, and will probably come back with questions.

Thanks again.

Tom

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