mIRC Homepage
Posted By: gerdigos Keep window open - 17/02/04 09:42 PM
I am writing an alias to ICMP ping machines using the ping command from the windows command line (winXP).
Code:
 iping { if (!$1) { echo -a Syntax: /iping <nick|ip|hostname> | halt } 
  if (. isin $1) { run C:\WINDOWS\system32\ping.exe $1 } 
  else { var %x = $address($1,5) 
    if (%x == $null) { echo -a Nickname not in IAL, IAL not enabled, or IAL not filled up. Can't find user's IP or hostname. | halt } 
    else { %x = $gettok(%x,2,64) | run C:\WINDOWS\system32\ping.exe %x } 
  } 
} 
 

But this closes the command line window, after the ping command finishes. Does anyone have any idea how to keep the window alive? confused
Thanks in advance.
Posted By: tidy_trax Re: Keep window open - 17/02/04 09:53 PM
run /k path
Posted By: Iori Re: Keep window open - 17/02/04 10:34 PM
  • run cmd.exe /k ping $1
Posted By: gerdigos Re: Keep window open - 18/02/04 03:02 PM
thank you both for your answers, finally solved the problem thanks to Iori wink .
I had tried to run it using cmd.exe, but hadn't worked. The /k switch made it just fine. Thanks again smile
© mIRC Discussion Forums