SRL Archive - News and General

connection alarm?


Main

2009-07-13 06:59:21

I've been messing around with scar on other games. But unfortunately I get disconnected and I don't notice it until I wake up or come back from work.

Is there a way for scar (or if you know other programs that also have the function) check on the connection every x minute (lets say by connecting to a webpage or server or something) to see if the internet is disconnect? and if it is disconnected, then make it play a wave (or any other sound file).

If you know any program, gimmie the name NOT THE LINK:) and if you can make up a scar code for it, that would be great too :)
TY

Da 0wner

2009-07-13 07:06:00

Yes. SCAR can..

Simple code:
Connected : boolean;
begin
result := GetPage('http://google.com') <> '';
end;
You can have better, but that should suffice.

Gu3st...

2009-07-13 15:01:44

From: Da 0wner
Yes. SCAR can..

Simple code:
Code:
[LEFT]Connected : boolean;
begin
result := GetPage('http://google.com') <> '';
end;
[/LEFT]

You can have better, but that should suffice.

Well.. If scar has no connection then it would take like 1 minute before GetPage() returns anything..

EDIT: Oh wow… It was instant :S sorry…

Da 0wner

2009-07-13 15:08:55

No. You would get
Socket Error # 11004
if you weren't connected and called that.

Floor66

2009-07-13 15:11:06

1 minute, 0 seconds, who cares! As long as you get the message.