Results 1 to 5 of 5

Thread: connection alarm?

  1. #1
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default connection alarm?

    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
    Oh Hai Dar

  2. #2
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes. SCAR can..

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

  3. #3
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Da 0wner View Post
    Yes. SCAR can..

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

    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...
    Last edited by Zyt3x; 07-13-2009 at 07:12 PM.

  4. #4
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No. You would get
    Socket Error # 11004
    if you weren't connected and called that.
    Last edited by Da 0wner; 07-13-2009 at 07:11 PM.

  5. #5
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    1 minute, 0 seconds, who cares! As long as you get the message.
    Ce ne sont que des gueux


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •