erezlevi Posted May 3, 2008 Share Posted May 3, 2008 hi, I tried using SampleDDEserver.au3 UDF. although I am able to connect to it, when sending commands to it, it only shows the first letter of the command but not the rest. where can I modify it to be able to recieve a string ? I tried to look into DDEMLSERVER and DDEML but I didn't understand the corollation done there to the main script. I really appritiate a Moderator help here, or the person who wrote DDE UDF. Look at the attached JPEG. it shows the problem. I tries to send "99999" and only one 9 is recived. Link to comment Share on other sites More sharing options...
doudou Posted May 3, 2008 Share Posted May 3, 2008 hi,I tried using SampleDDEserver.au3 UDF. although I am able to connect to it, when sending commands to it, it only shows the first letter of the command but not the rest. where can I modify it to be able to recieve a string ? I tried to look into DDEMLSERVER and DDEML but I didn't understand the corollation done there to the main script. I really appritiate a Moderator help here, or the person who wrote DDE UDF.Look at the attached JPEG. it shows the problem. I tries to send "99999" and only one 9 is recived.The problem you encounter here is that your DDE client sends UNICODE strings but the server expects ASCII, thus command is truncated by the first 0 character. In order to simplify the API DDEML UDF was built with an automatic UNICODE detection: if @Unicode macro returns true it assumes command strings in _DdeCallback($XTYP_EXECUTE) to be of $CF_UNICODETEXT otherwise $CF_TEXT, which works for most client-server couples.Just ensure your server script is executed by Au3Info.exe (not Au3InfoA.exe) or in case of compiled scripts that the appropriate UNICODE stub is included in your EXE. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
erezlevi Posted May 3, 2008 Author Share Posted May 3, 2008 The problem you encounter here is that your DDE client sends UNICODE strings but the server expects ASCII, thus command is truncated by the first 0 character. In order to simplify the API DDEML UDF was built with an automatic UNICODE detection: if @Unicode macro returns true it assumes command strings in _DdeCallback($XTYP_EXECUTE) to be of $CF_UNICODETEXT otherwise $CF_TEXT, which works for most client-server couples.Just ensure your server script is executed by Au3Info.exe (not Au3InfoA.exe) or in case of compiled scripts that the appropriate UNICODE stub is included in your EXE.Hi, the client I am using is a program developed by Avaya. I don't think it sends unicode but it is a good assumption, how can I solve it via the DDEML udf ?where in the script I can insert a msgbox showing what the server is getting in the first place? Link to comment Share on other sites More sharing options...
doudou Posted May 3, 2008 Share Posted May 3, 2008 Hi, the client I am using is a program developed by Avaya. I don't think it sends unicode but it is a good assumption, how can I solve it via the DDEML udf ?Please, read my first answer carefully, it contains the solution.where in the script I can insert a msgbox showing what the server is getting in the first place?If you want to see (or handle) raw data from a DDE conversation you will have to implement your own UDF lib or at least reimplement _DdeCallback(). The goal of DDEML UDF is in first line to spare the developer fiddling with just those details. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
erezlevi Posted May 3, 2008 Author Share Posted May 3, 2008 Please, read my first answer carefully, it contains the solution.If you want to see (or handle) raw data from a DDE conversation you will have to implement your own UDF lib or at least reimplement _DdeCallback(). The goal of DDEML UDF is in first line to spare the developer fiddling with just those details.I'v tried changing all If @Unicode Then $wFmt = $CF_UNICODETEXT to $CF_TEXT it solved half of it. I now get to see the Topic... but the command itself is still truncated. I am not a developer, so this is how I tried changing the Unicode stuff, I'v attached another screen shot of what I see now instead of before...I really apritiate your help with this one.Thanks, Link to comment Share on other sites More sharing options...
doudou Posted May 3, 2008 Share Posted May 3, 2008 If @Unicode Then $wFmt = $CF_UNICODETEXT to $CF_TEXT it solved half of it. I now get to see the Topic... but the command itself is still truncated.Well, this is because it is NOT the solution: if you do that you just break the UNICODE handling all together.As said: you have to ensure both - client and server - run with the same character encoding either UNICODE or ASCII. As long as the @Unicode macro is false in your server it will never understand the client sending UNICODE to it, so execute the script in the right AutoIt interpreter. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
erezlevi Posted May 3, 2008 Author Share Posted May 3, 2008 Well, this is because it is NOT the solution: if you do that you just break the UNICODE handling all together. As said: you have to ensure both - client and server - run with the same character encoding either UNICODE or ASCII. As long as the @Unicode macro is false in your server it will never understand the client sending UNICODE to it, so execute the script in the right AutoIt interpreter. so execute the script in the right AutoIt interpreter [/qoute] where do I change that? Link to comment Share on other sites More sharing options...
doudou Posted May 3, 2008 Share Posted May 3, 2008 where do I change that?S. AutoIt online help Using AutoIt/Unicode Support and Using AutoIt/Compiling Scripts UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
erezlevi Posted May 3, 2008 Author Share Posted May 3, 2008 (edited) where do I change that?S. AutoIt online help Using AutoIt/Unicode Support and Using AutoIt/Compiling ScriptsOK solved using AutoIt3A.exe instead of AutoIt3.exe...ThankyouVeryMuch......works works works works works!~!!!!!!!!!!!!!!!!!!!!!!!!!!!! it was ANSI....attached screen shot. Edited May 3, 2008 by erezlevi Link to comment Share on other sites More sharing options...
doudou Posted May 3, 2008 Share Posted May 3, 2008 ThankyouVeryMuch......works works works works works!~!!!!!!!!!!!!!!!!!!!!!!!!!!!! it was ANSI....It's a pleasure UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now