DDE execute from LiveCode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: DDE execute from LiveCode
Update:
When you save a standalone application, the external (at least the DDE execute) does not work anymore.
- In StandAlone application setting, "DDE" appears on the Script Library
- but it does not get saved on the "Externas" folder created with the new Win app
- tried to manually copy the "EXT.dll" file from the LiveCode directory to the "Externals" folder or to the same directory of the new app.
- the "ext_DDEexecute" command inside the LiveCode script simply does nothing (nothing on the result or on it) and it aborts the execution of LiveCode script
- The app does not bomb tough. It simply stops at the line.
Could it be related to the licence issue ?
Trevix
When you save a standalone application, the external (at least the DDE execute) does not work anymore.
- In StandAlone application setting, "DDE" appears on the Script Library
- but it does not get saved on the "Externas" folder created with the new Win app
- tried to manually copy the "EXT.dll" file from the LiveCode directory to the "Externals" folder or to the same directory of the new app.
- the "ext_DDEexecute" command inside the LiveCode script simply does nothing (nothing on the result or on it) and it aborts the execution of LiveCode script
- The app does not bomb tough. It simply stops at the line.
Could it be related to the licence issue ?
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: DDE execute from LiveCode
Ah, got it. OK.
Re: DDE execute from LiveCode
Sorry, I must correct myself.
It works: I just forgot to create the runtime directory for the externals (My Documents\My LiveCode\Runtime\Windows\x86-32\Externals)
It still come up with the dialog asking for a licence, tough...!!!
Trevix
It works: I just forgot to create the runtime directory for the externals (My Documents\My LiveCode\Runtime\Windows\x86-32\Externals)
It still come up with the dialog asking for a licence, tough...!!!
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: DDE execute from LiveCode Tuviah's LICENCE
PLEASE: nobody seems to know how to buy/get the licence for the old Tuviah external !!!
Do you have any info ?
Do you know how to contact Tuviah ? (if he is still around...)
Thanks for any help
Trevix
Do you have any info ?
Do you know how to contact Tuviah ? (if he is still around...)
Thanks for any help
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: DDE execute from LiveCode
Yep, he is still using that email address!
Re: DDE execute from LiveCode
Hi all.
Unfortunately he does not answer...nor does runrev support.
I'm open to suggestions ! Are there other ways to do it ? (Shell? Dos ?)
(I tough that the possibility of firing a DDE execute from LiveCode could be of interest...)
Thanks
Trevix
Unfortunately he does not answer...nor does runrev support.
I'm open to suggestions ! Are there other ways to do it ? (Shell? Dos ?)
(I tough that the possibility of firing a DDE execute from LiveCode could be of interest...)
Thanks
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: DDE execute from LiveCode FAILURE
As of today I've been confirmed that there is no more around any licence or licence generator for the Tuviah' external collection.
Too BAD
Thanks to all, anyway (please, just remember to unlock your things when you decide to make them free...
Trevix
Too BAD
Thanks to all, anyway (please, just remember to unlock your things when you decide to make them free...

Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: DDE execute from LiveCode
Hi Trevix,
Have you tried running a Windows command line tool from LC like ClassExec
http://fvue.nl/wiki/ClassExec
or DDE_Run.
http://www.angelfire.com/linux/myp/DDE_run/dde_run.html
Article on usage of above and other DDE command line tools at
http://www.robvanderwoude.com/ddecommandline.php
cheers
Paul
Have you tried running a Windows command line tool from LC like ClassExec
http://fvue.nl/wiki/ClassExec
or DDE_Run.
http://www.angelfire.com/linux/myp/DDE_run/dde_run.html
Article on usage of above and other DDE command line tools at
http://www.robvanderwoude.com/ddecommandline.php
cheers
Paul
Re: DDE execute from LiveCode
I'm afraid I am not up to the task...
ClassExec: I don't even understand how it works. If i launch the ClassExec app, it shows an OK window ( with available option but no key can be entered) and nothing else. The command line does not reconize it...("ClassExec is not a command or an app..."). When I close the Ok window it just close itself
DD_run.exe: the application is not in the web page and i wouldn't know what to do with the source code (I don't know C/C+/C++)
As for the acticle page, I'm sorry but I dont understand how can it help me...
Remembering that what i need is to send DDEexecute from LiveCode, can you be more of help ?
Thanks
Trevix

ClassExec: I don't even understand how it works. If i launch the ClassExec app, it shows an OK window ( with available option but no key can be entered) and nothing else. The command line does not reconize it...("ClassExec is not a command or an app..."). When I close the Ok window it just close itself
DD_run.exe: the application is not in the web page and i wouldn't know what to do with the source code (I don't know C/C+/C++)
As for the acticle page, I'm sorry but I dont understand how can it help me...
Remembering that what i need is to send DDEexecute from LiveCode, can you be more of help ?
Thanks
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: DDE execute from LiveCode
Hi Trevix,
I've only used ClassExec from Windows, and that was 5 years ago on XP.
Things appear to have changed since then.
Sorry I can't help.
Paul
I've only used ClassExec from Windows, and that was 5 years ago on XP.
Things appear to have changed since then.
Sorry I can't help.
Paul
Re: DDE execute from LiveCode
I don't know if to keep this post on this forum or on "Using externals and plugin"...
I'm asking for a suggestion and help:
- I don't Know C++ and I cannot learn it (beside may be the basics...)
- There is a Microsoft web page with a C++ example of Simple DDE client
http://support.microsoft.com/kb/279721
- Visual C++ 2010 Express is available for free download
- the "Lessons and Tutorial" on building LiveCode externals look fairly easy (?)
http://www.runrev.com/developers/lesson ... externals/
Do you think is out of question to ask here for help on fixing the C++ code in order to build a LiveCode external to send DDEexecute from LiveCode ?
(It could be a command like: ExtCom_DDEexecute TheApp, TheArgument, TheVariables)
Is there someone willing to help me? I would off course post the finished external somewhere for free use by the community...
Trevix
I'm asking for a suggestion and help:
- I don't Know C++ and I cannot learn it (beside may be the basics...)
- There is a Microsoft web page with a C++ example of Simple DDE client
http://support.microsoft.com/kb/279721
- Visual C++ 2010 Express is available for free download
- the "Lessons and Tutorial" on building LiveCode externals look fairly easy (?)
http://www.runrev.com/developers/lesson ... externals/
Do you think is out of question to ask here for help on fixing the C++ code in order to build a LiveCode external to send DDEexecute from LiveCode ?
(It could be a command like: ExtCom_DDEexecute TheApp, TheArgument, TheVariables)
Is there someone willing to help me? I would off course post the finished external somewhere for free use by the community...
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: DDE execute from LiveCode
rotflthe "Lessons and Tutorial" on building LiveCode externals look fairly easy (?)
Let me take a step back here and ask: do you really need to use DDE to communicate with this program? DDE has been a dead technology for over 15 years.
Do you need to communicate with the program while it's running? or can you just start it by passing arguments to it on a command line?
If you can get by with the latter, then your job just became much easier.
Do you need to send information to the alien program or receive information from it or both?
Do you know the DDE specifications of the program in detail?
Re: DDE execute from LiveCode
I must use DDEexecute.
The alien program is a small "transition" app, always running, to an commercial accounting app. It has been made by developer in order to get data in and out of it (don't ask my why but they are no willing to change that...).
It only accept DDEexecute , in a form like "DDEexecute TheTransApp, TheArg, TheVar", where TheVar is a series of command and data.
It then writes to disk a text file with the answer data.
For what I have been reading on the web (tons...) there is still a lot of people that need to send DDE (Microsoft still does...)
Trevix
(P.S. what is "rotfl"? Something like...you got that wrong?)
The alien program is a small "transition" app, always running, to an commercial accounting app. It has been made by developer in order to get data in and out of it (don't ask my why but they are no willing to change that...).
It only accept DDEexecute , in a form like "DDEexecute TheTransApp, TheArg, TheVar", where TheVar is a series of command and data.
It then writes to disk a text file with the answer data.
YesDo you need to communicate with the program while it's running?
Only send info. (I get info back reading the text file)Do you need to send information to the alien program or receive information from it or both?
Yes, as i said I must be able do define only TheApp, TheArg, TheVar. That's it.Do you know the DDE specifications of the program in detail?
For what I have been reading on the web (tons...) there is still a lot of people that need to send DDE (Microsoft still does...)
Trevix
(P.S. what is "rotfl"? Something like...you got that wrong?)
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: DDE execute from LiveCode STEP 1
Hi All.
Waiting for some help, I downloaded the free Visual studio 2010 C++ express and spent a morning getting some basics on C++.
I managed to make a console application that fire DDEexecute with parameters but I am rather confused on what does what...!
Coming from LiveCode, C++ is very cumbersome and I am not sure if I was able to handle correctly all those string conversions. What it does is it opens the console, ask for the name of the application, the topic (for excel is the doc name) and send to it a DDEexecute with the parameters listed on the szCmd1[] string.
1- download Visual Studio C++ express 2010
2 make a new console project and name it DDClient3 (It's my third experiment...)
3- if, like me, you must handle accented chars, you must set the character set (on the DDClient property) to multibyte. I tried with Unicode, but i could not come up of al the mess in the string handling.
4- replace the content of the DDClient3.cpp with the following code:
Note that I'm not sure if it handles accented chars on the parameters to send. You cannot but backslash also on the parameters, since C++ considers the backslash as a special char, even inside quotes.
NOW, I only need to understand how to transform those input (TheApp, TheTopic, TheParameters) so as to be able to build an external for LiveCode...
Please help.
LONG LIFE TO LIVECODE.
Trevix
Waiting for some help, I downloaded the free Visual studio 2010 C++ express and spent a morning getting some basics on C++.
I managed to make a console application that fire DDEexecute with parameters but I am rather confused on what does what...!
Coming from LiveCode, C++ is very cumbersome and I am not sure if I was able to handle correctly all those string conversions. What it does is it opens the console, ask for the name of the application, the topic (for excel is the doc name) and send to it a DDEexecute with the parameters listed on the szCmd1[] string.
1- download Visual Studio C++ express 2010
2 make a new console project and name it DDClient3 (It's my third experiment...)
3- if, like me, you must handle accented chars, you must set the character set (on the DDClient property) to multibyte. I tried with Unicode, but i could not come up of al the mess in the string handling.
4- replace the content of the DDClient3.cpp with the following code:
Code: Select all
// Ask for application and topic and send a DDEexecute to it
//the DDE is the szCmd1
//
#include "stdafx.h"
#include "windows.h"
#include "ddeml.h"
#include "stdio.h"
#include <string>
#include <iostream>
using namespace std;
HDDEDATA CALLBACK DdeCallback(
UINT uType, // Transaction type.
UINT uFmt, // Clipboard data format.
HCONV hconv, // Handle to the conversation.
HSZ hsz1, // Handle to a string.
HSZ hsz2, // Handle to a string.
HDDEDATA hdata, // Handle to a global memory object.
DWORD dwData1, // Transaction-specific data.
DWORD dwData2) // Transaction-specific data.
{
return 0;
}
void DDEExecute(DWORD idInst, HCONV hConv, char* szCommand)
{
HDDEDATA hData = DdeCreateDataHandle(idInst, (LPBYTE)szCommand,
lstrlen(szCommand) +1, 0, NULL, CF_TEXT, 0);
if (hData==NULL) {
printf("Command failed: %s\n", szCommand);
}
else {
DdeClientTransaction((LPBYTE)hData, 0xFFFFFFFF, hConv, 0L, 0,
XTYP_EXECUTE, TIMEOUT_ASYNC, NULL);
}
}
int main(int argc, char* argv[])
{
char myapp[30];
char mytopic[80];
cout << "App name:";
cin >> myapp;
cout << "Topic name:";
cin >> mytopic;
//parameters to send (no backslash...)
char szCmd1[] = "S;C:/archiviMida4/O01820110701.MDB;;C:/CC_SaniMont_DB2012/IOMidaDbFornitura/RisultatoMida.txt;C:/CC_SaniMont_DB2012/IOMidaDbFornitura/EsitoMida.txt;2646_clienteCodice;1014";
//DDE Initialization
DWORD idInst=0;
UINT iReturn;
iReturn = DdeInitialize(&idInst, (PFNCALLBACK)DdeCallback,
APPCLASS_STANDARD | APPCMD_CLIENTONLY, 0 );
if (iReturn!=DMLERR_NO_ERROR)
{
printf("DDE Initialization Failed: 0x%04x\n", iReturn);
Sleep(1500);
return 0;
}
////Start DDE Server and wait for it to become idle.
//HINSTANCE hRet = ShellExecute(0, L"open", szTopic, 0, 0, SW_SHOWNORMAL);
//if ((int)hRet < 33)
//{
// printf("Unable to Start DDE Server: 0x%04x\n", hRet);
// Sleep(1500); DdeUninitialize(idInst);
// return 0;
//}
//Sleep(1000);
//DDE Connect to Server using given AppName and topic.
HSZ hszApp, hszTopic;
HCONV hConv;
hszApp = DdeCreateStringHandle(idInst, myapp, 0);
hszTopic = DdeCreateStringHandle(idInst, mytopic, 0);
hConv = DdeConnect(idInst, hszApp, hszTopic, NULL);
DdeFreeStringHandle(idInst, hszApp);
DdeFreeStringHandle(idInst, hszTopic);
if (hConv == NULL)
{
printf("DDE Connection Failed.\n");
Sleep(1500); DdeUninitialize(idInst);
return 0;
}
//Execute commands/requests specific to the DDE Server.
DDEExecute(idInst, hConv, szCmd1); //send the DDE
//DDE Disconnect and Uninitialize.
DdeDisconnect(hConv);
DdeUninitialize(idInst);
Sleep(3000);
return 1;
}
NOW, I only need to understand how to transform those input (TheApp, TheTopic, TheParameters) so as to be able to build an external for LiveCode...

Please help.
LONG LIFE TO LIVECODE.
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>