Jump to content

Possible to export functions?


Recommended Posts

possible?... can be...

Frowned upon.. definitely, just write the author and ask for the function... or write your own. If a script is using a custom function that isn't available on the forum, then they probably don't want you to have it.

It would not be creating a DLL though... did I misunderstand the question? are you trying to decompile a DLL that is FileInstalled into the exe, or are you just trying to steal the functions from the compiled exe?

Link to comment
Share on other sites

possible?... can be...

Frowned upon.. definitely, just write the author and ask for the function... or write your own. If a script is using a custom function that isn't available on the forum, then they probably don't want you to have it.

It would not be creating a DLL though... did I misunderstand the question? are you trying to decompile a DLL that is FileInstalled into the exe, or are you just trying to steal the functions from the compiled exe?

I think you misunderstand.

I want to be able to have two AutoIT scripts, call them Script.exe and Library.dll, I want to be able to have Script.exe dynamically call functions in Library.dll. The trick is that both the exe and the dll are AutoIT scripts I wrote.

The idea is to have unchanging functionality in the exe while the much smaller library dll can be updated quickly and easily.

Link to comment
Share on other sites

  • Moderators

I think you misunderstand.

I want to be able to have two AutoIT scripts, call them Script.exe and Library.dll, I want to be able to have Script.exe dynamically call functions in Library.dll. The trick is that both the exe and the dll are AutoIT scripts I wrote.

The idea is to have unchanging functionality in the exe while the much smaller library dll can be updated quickly and easily.

It's rather useless the way it would have to be done when you can just include all those functions from within that AutoIt script anyway.

There is an AutoItX dll for the standard AutoIt functions.

You can use Command Line Parameters for anything else if you must use an .a3x or aut.exe for the job.

You could also launch other a3x or aut scripts/executables with /AutoIt3ExecuteScript.

So what you are asking...

Yes it's possible.

But, it won't be a dll.

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.

Link to comment
Share on other sites

It's rather useless the way it would have to be done when you can just include all those functions from within that AutoIt script anyway.

There is an AutoItX dll for the standard AutoIt functions.

You can use Command Line Parameters for anything else if you must use an .a3x or aut.exe for the job.

You could also launch other a3x or aut scripts/executables with /AutoIt3ExecuteScript.

So what you are asking...

Yes it's possible.

But, it won't be a dll.

True, but then I have to maintain one huge monolithic script, I much rather put all the unchanging code in the exe and not have to worry about maintaining it or updating it. Any time I wanted to change or add functionality I could send out a small dll update without having to worry about breaking anything else.

Honestly I'd much rather use a different language for this, it's not really what AutoIT was designed for, I'm not using any of the automation functionality. But my current spec says using AutoIT..

Edited by MichaelDotNet
Link to comment
Share on other sites

  • Developers

True, but then I have to maintain one huge monolithic script, I much rather put all the unchanging code in the exe and not have to worry about maintaining it or updating it. Any time I wanted to change or add functionality I could send out a small dll update without having to worry about breaking anything else.

Honestly I'd much rather use a different language for this, it's not really what AutoIT was designed for, I'm not using any of the automation functionality. But my current spec says using AutoIT..

whats wrong with putting these "standard" functions into a file and using #Include<myStandardFunc.au3> ?

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

  • Moderators

The includes are only processed at compile time, once the file is compiled and distributed any changes or additions to that file will not be reflected in the exe.

Make an .a3x file as your DLL, and use AutoIt3ExecuteScript + command line params for the functions + Call + Params. More work than it's worth if you know how to program in other languages.

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.

Link to comment
Share on other sites

Make an .a3x file as your DLL, and use AutoIt3ExecuteScript + command line params for the functions + Call + Params. More work than it's worth if you know how to program in other languages.

That's sort of what I figured anyway... I don't suppose there's anyway to utilize the autoit stub that the compiled exe would include?

Link to comment
Share on other sites

  • Moderators

That's sort of what I figured anyway... I don't suppose there's anyway to utilize the autoit stub that the compiled exe would include?

Yes, I've said it now 3 times.

/AutoIt3ExecuteScript

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.

Link to comment
Share on other sites

  • Moderators

Seems fair, considering I had to explain myself about that many times ;)

I apologize, I did not realize you were referring to a switch that could be used with the hypothetical script.exe.

No worries, and :) @ being fair.

I remember making a sort of a3x/dll type once, but for the life of me I can't find it now. I don't think I ever finished as I thought it was just easier to include the code, or compile a script to .a3x and just run it with /AutoIt3ExecuteScript.

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...