Jump to content
Macro Express Forums

Interface To Other Programming Languages


Les Hazlett

Recommended Posts

Hi, I haven't posted for a long time.

 

I have successrully executed other applications from ME, so I understand how to Launch Programs. What I would like to find out is if it is possible to interface to code written in other languages.

 

I am considering an application in which I really need arrays, lists, indexes etc. It would be convenient if I could tie this application into an existing set of ME macros.

 

Is it possible in Macro Express to call a procedure writen in a language like Python or VB, pass it parameters, and get parameters returned to Macro Express? I spent some time searching for various key words here in the Forum but found nothing close.

 

Hope there is someone who has tried this before.

 

Thanks,

 

Les

Link to comment
Share on other sites

I think the best way to handle something like this is to WRITE the data to a File which you can do rather easily in ME and then when you get to your other application, READ this data into your application. You could then have your Application WRITE the Changed Data to the same File and have ME Read it upon Return.

 

That seems to be the simpilest approach to your problem.

Link to comment
Share on other sites

I have written a VB server program which interfaces well with ME (it's part of our PGM Library package). It uses the registry to communicate with the server, and I have written it in such a way that new functionality can very easily be added by writing a new VB "DLL". One issue you need to take care of (among several others) is to force ME to wait until your external program has finished processing (I use a semaphore flag for this, again via the registry).

Link to comment
Share on other sites

Here are the comments for the code in question:

Check for completion of process

This is graduated as follows:

For the first 2 seconds, check the semaphore every 50 milliseconds

After that, check every second for a maximum of %N1% seconds

 

The first wait is done using the standard Delay in Milliseconds, while the second (and usually longer) wait is done with the Wait Time Delay 1 seconds command (which uses no CPU). So, no, I don't believe this imposes much of a burden on the system. And timeouts are handled by the second wait which has a user-definable maximum wait period.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...