First up, thanks so much for taking the time to reply so thoroughly. I really appreciate it.
Thanks also for your code sample for xmplay. The only problem with it seems to be that I think Sean has updated his dde stuff. I say this for two reasons - first, his function names now seem to be more like DdeInitialize, not DDE_Initialize. Second, there seem to be other changes, eg his DdeClientTransaction function is now taking the address of sData, so you probably don't need to in your function call.
The reason I'm saying this is that in trying to adapt your example to his new code, and my application, it's not working. The address of sData is one reason it mightn't work for me - but clearly there's some other reason I've not spotted.
Quote:
Don't know about hWndServer. It appears to be null (empty) thoughout the example code. All I can say about it is tbat the code works (getting a browser's current web page title).
True - except that hWndServer is only used in the functions DDE_POKE and DDE_EXECUTE, in DDEMessage.ahk - and as best I can tell, neither of these are called when getting the browser's current web page title.
I asked if DDE_EXECUTE works - which was meant to be a reference to DDE_EXECUTE in Sean's DDEMessage.ahk (since I was worried it wouldn't due to hWndServer). You appear to have responded regarding DDE_Execute, in Joy2DWorld's dde.ahk.
Regarding Joy's DDE_Execute - I had the same experiences. It worked for me too - but also left the servers in a weird state. You appear to call DDE_KILL twice - once with the name and topic, then with no arguments. In theory, either of these should do I think. I think it's the first call which is generating the "++DDE UNDEFINED TERMINATION ERROR system|XMPlay 20 ** " - as it did for me, so I changed to the second method, which had no error, but the 'weird state' was the same regardless. Re the first call, Joy tries to keep a record of all dde connections I think, and I suspect that maybe there's a bug there and it's not finding the named connection in his list. But I may be wrong, I've not managed to follow his code fully.
Quote:
The biggest problem I had getting DDE to work, was getting the server name, topic, and commands correct (the required quoting was very confusing).
I wonder if you could be kind enough to elaborate here. I think I understand that AHK has an equivalence between
var1 := "some text"
and
var1 = some text
OR
var2 := someVariable
and
var2 = %someVariable%
But I'm guessing you're referring to something else?
Thanks for the command line utilities, I'll check them out.
Quote:
I was going to post to Joy2Dworld's topic get help
For the record, I did write a PM to him asking for his assistance with this topic, as I rather liked the intent of his code, handling all connections for you etc - but no response yet.
Thanks again for your help - I'll keep trying, and maybe your command line utilities are just what I need.