Using open-uri or net/http to download a file from web?
-
Hi all!
Can I use open-uri or net/http to download a file from web in SU? -
Re-posting the lost post...
One possibility is to use the built-in SKSocket class in SketchUp. The following snippet might be useful:
def listener(s) $str << s if s == "Connection established" SKSocket.write "GET /RubyLibraryDepot/Ruby/weld.rb HTTP/1.0\r\n\n" end if s == "Connection closed" puts "Done" # Do something useful with the data end end $str = [] if Sketchup.is_online SKSocket.connect "www.crai.archi.fr", 80 SKSocket.add_socket_listener {|e| listener(e)} end -
Could this be used to enforce/update a corporate SketchUp standard installation, I wonder?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement