Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. winsock and VBScript with mswinsock object

winsock and VBScript with mswinsock object

Scheduled Pinned Locked Moved Web Development
helpjavaphpsysadmindebugging
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fjveca
    wrote on last edited by
    #1

    Good morning, I need some help with a code in vbscript using mswinsock object, what am trying to do is to send a charater string to a server listening and get a response to that, the problem is that i can´t make the winsock object connect to the server, i cant make it in server code (php, asp, jsp) because this vbscript will be running in a IVR (interactive voice response) tha handles vbscript code, i can´t create a socket object in the IVR code because their lazy designers (sorry am not saying the brand of the IVR) say it is too complicated and instead they have an vbscript emulator for things like that, so i have to debug the vbscript code in a web page because it is easier, and once i have the script in the webpage running fine i can move it to the IVR, am posting the code to see if anyone has any idea of why the object isn´t connecting, and i know am being too restrictive but i can´t use anything but mswinsock because the client doesn´t want to use third party components because they are expensive and with the mswinsock it must work. By the way thanks in advance. after a very long explanation here is the code: New document Sub socket() dim hostname dim port dim profesional dim recibir hostname = "192.168.1.32" puerto = 12013 MsgBox("works until here")' set winsock = createobject("MSWINSOCK.Winsock") MsgBox("works until here 2")' puerto = 12013 winsock.RemoteHost = hostname 'direccion ip del host remoto winsock.RemotePort = puerto 'numero del puerto por el que se envian los datos winsock.Connect MsgBox("works until here 3")' mensaje = "Sending test message" If winsock.State = sckConnected Then winsock.SendData profesional MsgBox("message sent")' else MsgBox("the socket isn´t connected")' End If End Sub 'AES.SetReturnValue 0 press here one last thing, forgive my english because it isn´t my primary language

    Life can only be understood in reverse bur must be lived forward

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups