DDE execute from LiveCode

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

DDE execute from LiveCode

Post by trevix » Mon Feb 06, 2012 1:03 pm

I've got hold of a non Rev app that respond only to DDE execute command (with variables).
- As I understand LiveCode does not run DDE.
- The old Tuviah external collection is not available any more on the web.
- Using in LiveCode a do "this" as Vbscript does not work because VBScript does not support DDE (http://msdn.microsoft.com/en-us/library/30593abb.aspx).
Is there any way I can run DDE execute from LiveCode ? (I need "execute" only, no other DDE command...)
Thanks
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: DDE execute from LiveCode

Post by Klaus » Mon Feb 06, 2012 2:49 pm

Hi Trevix,

since I seldom trash things, I till have a copy of Tuviahs external collection for Windows! :D
Drop me line privately: klaus AT major-k.de

But I cannot guarantee that it will still work with the latest LiveCode versions.

Best

Klaus

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: DDE execute from LiveCode

Post by townsend » Mon Feb 06, 2012 7:19 pm

I've often wondered if Livecode had some kind of DDE (dynamic data exchange) equivalent.

Since LC does not do multi-threading, maybe a separate executable could be used as a thread. But to do so would require some means of communication.

If nothing else the controlling executable could write instructions to a file, where the client executable would check periodically. Anything better than this to simulate multi-threading?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: DDE execute from LiveCode

Post by mwieder » Mon Feb 06, 2012 7:30 pm

I've used both the shell and process functions to spawn tasks out to python or other executables. But the real problem with simulating multi-threading is simulating mutexes and handling parallelism. You can also use socket communications for threading - I do this by encapsulating the calling handler in the response packet so I can match up the asynchronous replies.

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: DDE execute from LiveCode

Post by townsend » Mon Feb 06, 2012 8:35 pm

Thanks Mark. Wow-- great answer! I had to look up mutexes.
(Mutex) Mutual exclusion (often abbreviated to mutex) algorithms are used in concurrent programming to avoid the simultaneous use of a common resource. An object in a program that serves as a lock, used to negotiate mutual exclusion among threads

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: DDE execute from LiveCode

Post by mwieder » Mon Feb 06, 2012 9:02 pm

I forgot to mention that reentrancy can also be a problem. None of these are LiveCode problems per se, but just some of the joys of multithreading.

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: DDE execute from LiveCode

Post by townsend » Mon Feb 06, 2012 9:52 pm

Reentrancy? Another word I'm not familiar with.
A computer program or subroutine is called reentrant if it can be interrupted in the middle of its execution and then safely called again ("re-entered") before its previous invocations complete executing.

A subroutine that is directly or indirectly recursive should be reentrant. This policy is partially enforced by structured programming languages. However a subroutine can fail to be reentrant if it relies on a global variable to remain unchanged but that variable is modified when the subroutine is recursively invoked.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: DDE execute from LiveCode

Post by mwieder » Mon Feb 06, 2012 10:49 pm

The basic idea is that if you call a multithreaded function from one place and then call it again or call it from another place, you don't want to overwrite variables that are still in use... much gnashing of teeth and tearing of hair ensues.

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: DDE execute from LiveCode

Post by trevix » Tue Feb 07, 2012 10:18 am

(Somehow my previous answer to Klaus did not get trought...)
Anyway, thanks Klaus: it still works with LiveCode 4.6.4.
Problem is that I cannot get/buy a licence since the web site does not exist and the recurring dialog is intrusive.
Anybody knows about it ? Wasn't the licence supposed to be free ? (http://www.mail-archive.com/metacard@li ... 03822.html)

As for how I use it, with my limited experience, in case it is of anyone interest:

I need to work with FileMaker GO (on iPad), a FileMaker on a PC as server and an accounting third party application that understand only DDE execute (saving text file to HD) on the same PC.
FileMaker GO on iPad does not do DDE (as FileMaker does). So...
- I send an URL from the iPAD to a LiveCode application (sockets). The filemaker has a loop and the record get locket until it get an answer or time expire.
- The LiveCode app receive the URL, fire the DDE (that I believe freeze the script during execution) and read the data from disk written by the accounting app
- LiveCode return to a FileMaker Web Viewer the collected data. Fm acts accordingly and unlock the record.

To me, at first sight, it seemed too complex but...it works: it is pretty fast over an intranet (1 sec to get a record) and in this way I can even print from the iPAD on the network printer (firing a script from LiveCode App to the FM on the PC)
Regards
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: DDE execute from LiveCode

Post by trevix » Thu Feb 09, 2012 11:34 am

Anybody knows how to solve the license problem with the old Tuviah external collection ?
Is this guy still around ? (He was working at Revolution, for what I know..)

Sorry to bother, but like this it is useless...!
Thanks
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: DDE execute from LiveCode

Post by Klaus » Thu Feb 09, 2012 4:33 pm

Buongiorno Trevix,

just write to support@runrev.com and explain the situation!
I am sure they will be able to help you and I bet the license is still free after all these years.


Best

Klaus

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: DDE execute from LiveCode

Post by mwieder » Thu Feb 09, 2012 6:10 pm

The MetaCard license is indeed still free, but RunRev/LiveCode now owns the rights to the engine. So while you can still use MetaCard without problems, if you want to use newer versions of the engine you will have to get a more recent version of LiveCode, register it in order to activate it, and then you can use it in the MetaCard environment.. That whole process is actually easier now than it used to be. And you might want to check out the MetaCard forum here.

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: DDE execute from LiveCode

Post by trevix » Fri Feb 10, 2012 9:36 am

I am not sure to understand what you mean, mwieder.
- I already own a 4.6.4 LiveCode desktop commercial licence (you mean it is enough for me to upgrade to LiveCode 5.0, in order to make the extension work ?)
- I don't know MetaCard and I do not intend to use it. I only need to use this DDE external made by Tuviah, that works fine with LiveCode but is sometime blocked by a specific external licence request.
- I did not find any reference to my problem on the MetaCard forum

Can you please explain me what you ment. (Sorry for my dumbness...)
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: DDE execute from LiveCode

Post by Klaus » Fri Feb 10, 2012 12:13 pm

Hi friends,

Babel? :D

Mark, we are talking about the license for the "Externals collection" of Tuviah, not for MetaCard or anything else.
Trevix, write to support@runrev.com!


Best

Klaus

trevix
Posts: 1064
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Re: DDE execute from LiveCode

Post by trevix » Fri Feb 10, 2012 1:50 pm

Thanks, I've already done it:
Thank you for your request.
I do have a copy of these externals, but I don't appear to have any license for
them. I'm passing this query on to Tuviah, possibly he can help you.
Regards,
Heather
Guess I will have to wait...
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Post Reply