burque505 wrote: ↑20 Nov 2020, 09:03@william_ahk, try this code. There's apparently a carriage return in the stdout from 'echo'.Regards, burque505Code: Select all
#Include RunCmd.ahk str1 := RunCMD(A_ComSpec . " /c echo SKAN") str1 := RegExReplace(str1, "`r`n") msgbox % str1 If (str1 == "SKAN") msgbox Equal else msgbox %str1% Is Not Equal to SKAN
Thanks @burque505
We may also use RTrim()
