Forgot password?

Create an account!

Forum

« back

RhinoScript – Getting the contents of a URL

Messages

Please log in to write a message.

  • 4. Hanno (Oct 08, 2011 12.22):

    Win7 x64 with both Rhino 4 SR9 and the current Rhino 5 beta.

  • 3. andyhunti (Oct 07, 2011 21.21):

    Thanks Hanno.

    What system are you trying it on? Which version of Windows and which version of Rhino?

  • 2. Hanno (Oct 07, 2011 17.13):

    Hi Andy,

    I quickly tested your code, and it works fine for me. The "wscript.echo" must be a "Rhino.Print", but once that is changed it nicely prints out the google start page.
    So I don't know where the problem is, but maybe knowing that it works for me already helps tracking it down...

    Hanno

  • 1. andyhunti (Oct 06, 2011 19.58):

    Hi there,
    I'm trying to get the contents of a url.
    I've got it working in VBscript using the following:

    Dim objHttp
    Set objHttp = CreateObject("Msxml2.ServerXMLHTTP")
    objHttp.Open "GET", "http://www.google.com/", False
    objHttp.Send
    wscript.echo(objHttp.ResponseText)
    Set objHttp = Nothing

    But as soon as I pull that into Rhino I get an "object does not support that method" on the createObject line.

    I'm guessing that this has something to do with whichever objects are available when scripting in Rhino but I don't really use vbscript or understand the architecture with any significant depth.

    Can anyone shed any light on this or suggest a solution? I'd rather not have an additional script pulling the data down and saving it locally to be read by Rhino.

    Cheers,

    Andy

Recommend

Why are these buttons gray?