Rebol Talk Forum  |  REBOL Discussions  |  REBOL Chat  |  Topic: Prompt to connect
Pages: [1] Print
Author Topic: Prompt to connect  (Read 626 times)
DefiantPc
Administrator
Jr. Member
*
Offline Offline

Posts: 69


View Profile
Prompt to connect
« on: March 05, 2004, 02:24:07 PM »

Is their a way to create a link that that would open a internet connection?

For example...

I have a link in a application created in view that says connect. they click the link and it will open their dun so they can connect to the net.

example 2:

In my application I have a browse link to a website when the  link is selected it will prompt to connect to the net if the connection is not already present.
Logged
Sunanda
Jr. Member
**
Offline Offline

Posts: 96


View Profile
Prompt to connect
« Reply #1 on: March 08, 2004, 02:39:26 PM »

I don't think there is any way you can do example 1 -- maybe with some OS-specific calls from Command.

Example 2 is theoretically easier:

if not connected? [request "please connect!"]

But, in my experience, connected? is very flakey. It shows true when it shouldn't.

I suppose you could try to retrieve a (small!) webpage, and assume no connection if you can't:

if error? try [read http://www.rebol.org/robots.txt] [request "please connect!"]

(except rebol.org/robots.txt is not a good choice -- it's too big)

 
Logged
Gregg
Newbie
*
Offline Offline

Posts: 26


View Profile WWW
Prompt to connect
« Reply #2 on: March 18, 2004, 12:20:43 PM »

Under Windows you can either use the RAS API (req. /pro) or call RASDIAL and parse its output. I have a lot of the RAS API stuff mapped, and it's pretty hideous (about 1K LOC, with lots of ugly structures--they don't map well to REBOL), but it works. I think I even got async dialing working with the messages coming back on the system port. It only works in the console though, due to system port limitations.

Calling RASDIAL is really easy, though not as pretty for the user.

Holler at me on another channel (e.g. email, AltME) if you want to pursue either one; I don't come here much.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Chat  |  Topic: Prompt to connect
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 24, 2008, 07:04:31 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2191 Posts in 572 Topics by 1684 Members
Latest Member: CinemeandaBek

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc