trying to ping an IP using comspec Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Charon
Posts: 12
Joined: 20 Aug 2022, 07:34

trying to ping an IP using comspec

Post by Charon » 27 May 2023, 13:00

I have an IP address stored in a variable called IP. I used to use this line of code in version 1 to ping an IP address.

Code: Select all

 run, %comspec% /k color 8 & ping -t %IP%,
I tried to convert to version 2 with

Code: Select all

Run(A_ComSpec /k ping -t IP)
and tried:

Code: Select all

Run(A_ComSpec " /k color 8 & ping -t" IP)
but not working.

User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: trying to ping an IP using comspec  Topic is solved

Post by mikeyww » 27 May 2023, 14:04

Code: Select all

#Requires AutoHotkey v2.0
Run A_ComSpec ' /k ping -t ' IP

Post Reply

Return to “Ask for Help (v2)”