aDe wrote:I would like to know how to create a listening UDP winsock in a script for a NMDC hub and actually recieveing data on it...
I have created a winsock, made it udp, bound it, had it all setup but- I can't get any data from it.
aDe,
I tried to do this, too, without luck. What you have to do, as far as I understand VBScript, is to
Dim udpCommunication As Control Withevents. Now, this is not allowed in VBScript, partly because the Withevents keyword isn't available, and partly because even if it were, it would require an As Type declaration, which again, and more fundamentally, isn't allowed in VBScript.
Off the top of my head, your best solution would be to create an OCX, and just have a very short Sub Main() in the .script file, creating an instance of the OCX, and adding it to the hub. Possibly, you could also let this OCX raise events (either new ones, declared by you, or existing ones); if nothing else works, I suppose you could do this by calling the script control's script module that's running your .script file and executing commands... not that I've tried it, but it should work.
Kind regards,
Stimorol