Using a TMS Web Core memo to send the content to an external Delphi memo

Hi Friends and Bruno, I wonder if there is a way to, from a TMS Web Core memo, send its content to an external windows Delphi apps memo.

Is there anything external but common to both applications? Perhaps an XData server that they both have access to? TMS WEB Core could periodically send the contents there, and the other app (Delphi or anything else for that matter) could periodically make requests from there, sort of like a shared clipboard kind of idea. Presumably the user in both apps would have some identifier that would indicate that they were to be linked in this way?

Thank you, Andrew! In short, I'm using TMS WEB for a web speech recognition interface that needs to send the recognition results to a Delphi VCL application memo. I've tried the Clipboard approach, but for some reason, when the VCL application tries to paste the clipboard content into its memo, I receive a windows error message telling me "cannot copy to clipboard, access denied". Not sure if it's a Windows 10 issue, as I can CTRL-C and CTRL-V without a problem. I will try your XData approach. Thank You!

Are both the apps always run by the same user on the same machine?

XData might be overkill in that case, but still workable. Particularly if you're already familiar with setting up XData. The idea with XData would be that they could be run on separate devices entirely, using XData as an exchange point.

If they're both always running locally on the same device, a more direct approach may be to try something like setting up a port in the Delphi app to receive data, and configuring the TMS WEB Core app to contact that port and send data. Something like WebSockets would probably be what you're after here. Would also be possible then to not have any polling or anything - the TMS WEB Core app sends data when it is available, and the Delphi app's WebScoket event will get triggered when the data arrives.

Lots of options!

You could use the approach we use in TMS FNC WX components that is using a bridge to communicate between a browser instance hosted in the native app and the native app itself.

The bridge technique is explained here:

Thank you Bruno and Andrew! The TMS FNC WX approach should perfectly solve my goal. Congrats on creating these amazing tools and for this unbelievable fast support!

I just got this demo running after your advice Bruno, and it is really amazing. The best of both Desktop and Web worlds working in unison! Thanks again!

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.