texan

Compiled EXE return text value

3 posts in this topic

I have an autoit script that I complied as an EXE and I call it from another software application. 

Is there any way to get the autoit script to return a string value instead of a number?

Share this post


Link to post
Share on other sites



You could write data to StdOut and access the stream from the calling application.
Or write it to a file.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

For additional techniques search on IPC or Inter-Process Communication.  If there is a single value that is the result of the processing then write to file or standard out may be all you need.  If you have written the launching application as well as the launched program there are many methods that would allow you to process ongoing files/input/whatever using the launched program passing the results back to the launcher.  One is using windows messaging and WM_COPYDATA.  Or you could use memory mapped files or another form of shared memory.

There may be a UDF around that does WM_COPYDATA processing.  It is a relatively easy way to pass info from a processing handler to a main program on an ongoing basis.

Also named memory mapped files are not difficult once you have done the first one.  Likewise I would look for an existing UDF or at code written in another programming language to see how it is done.  Windows uses memory mapped files underneath many of the shared memory stuff to actually implement the memory sharing.  Also for loading executables into memory.  So is is likely to be one of the more optimized areas of system code.

 

 

 

 

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