mIRC Homepage
Posted By: Demolution retrieviing ping.exe from command prompt - 03/10/09 02:01 AM
Hey guys,

I was wondering if there's a quick and efficient way to retrieve the information without having to wait for the command to be completed.

so if you type !ping address

it'll ping and keep listing the next available output on each line, i'm sure there's a way, at this stage - the way i'm doing this is noobie style, i got it set to a certain timer, once it's finished.

Code:
on *:TEXT:!ping:#:{
  $pingrun($2)
  set %ping.inuse true
}

alias pingrun {
  set %ini ping.txt
  if ( %ping.inuse == true ) {
    msg # Sorry $nick $+ , someone has already requested for ping response.
    halt
  }
  if ( $2- == $null ||  127.0.0.1 isin $2- || localhost isin $2- ) { 
    msg # $nick $+ , please enter ip/hostname.
  }
  else {
    msg # Please wait, Pinging: $1
    run -n ping.bat $1
    timerpingnig 1 12 pingrun2
    timerremoveping 1 15 .remove %ini
    timerpinguse 1 16 unset %ping.inuse
  }
}

alias pingrun2 {
  set %ini ping.txt
  var %x = 1
  while ( %x < $lines(%ini) ) { 
    msg # $read(%ini,%x) $crlf
    inc %x
  }
}
Posted By: argv0 Re: retrieviing ping.exe from command prompt - 03/10/09 02:21 AM
Are you aware that you can control how many times ping.exe pings the remote server? Just set it to ping once, and you'll get your result right away.
quite aware of that

however, just prefer to let it go with 5 results... trying to make this script awesome smile
hey guys,

just letting you know figured out a quick way of doing this.

it's not what i wanted, however it'll do.

thanks for reading this post.

smile
Posted By: RusselB Re: retrieviing ping.exe from command prompt - 05/10/09 12:39 AM
Kindly relay how you did this, so that others can take advantage of the work that you've already done.
using a different ping external command to do quicker
© mIRC Discussion Forums