Jump to content



Photo

Making functions to use in C#


  • Please log in to reply
1 reply to this topic

#1 Newb

Newb

    Prodigy

  • Active Members
  • PipPipPip
  • 192 posts

Posted 07 March 2012 - 09:15 PM

I don't know if this is the right section. I'm trying to move on to C# after i learnt the basics with autoit, but I'm still much more confident with autoit which is mostly not object oriented (at least I think, I'm still noob to programming) and I would like to know if is possible to make some DLL with functions made in autoit which i can include and use freely in my C# programs.
With this I mean (I need explanations, sorry) I do for example a function like this in autoit:
Func Sum($a,$b) a+=b return a EndFunc

and i want to export it to my C# program so i can call Sum(a,:oops: into my program.

Is that possible, and if it is, How so?
How to build the DLL and make it work togheter with my program? I don't know much about dlls and I'm not very expert in programming, so is this too much for me or it could be done easily?
Thanks for the patience and move the topic if it isn't in the right section.
I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later I wrote it.





#2 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 8,830 posts

Posted 08 March 2012 - 10:46 AM

You cannot make a dll from autoit script.

You could however compile a script which has in it the functions you need.

Pass the function name and any parameters to it via command line.
AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users