|
Pages: [1]
|
 |
|
Author
|
Topic: Prompt to connect (Read 667 times)
|
DefiantPc
Administrator
Jr. Member
Offline
Posts: 70
|
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
|
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
|
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]
|
|
|
 |