mIRC Home    About    Download    Register    News    Help

Print Thread
Keep window open #71758 17/02/04 09:42 PM
Joined: Feb 2003
Posts: 76
G
gerdigos Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Feb 2003
Posts: 76
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.

Re: Keep window open #71759 17/02/04 09:53 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
run /k path


New username: hixxy
Re: Keep window open #71760 17/02/04 10:34 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
  • run cmd.exe /k ping $1

Re: Keep window open #71761 18/02/04 03:02 PM
Joined: Feb 2003
Posts: 76
G
gerdigos Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Feb 2003
Posts: 76
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