Update (SystemCmd()) : use left() instead of convert to list and processing item by item
@@ -892,22 +892,13 @@ Func chomp(cStr)
Func SystemCmd(cmd)
System(cmd + "> cmd.txt")
- cResult = read("cmd.txt")
+ cStr = read("cmd.txt")
# delete result file after get value
OSDeleteFile("cmd.txt")
- cStr = ""
- pResult = str2list(cResult)
- len = len(pResult)
- for line in pResult
- # if it last item remove newline
- if pResult[len] = line
- cStr += substr(line,nl,"")
- exit
+ if right(cStr,1) = nl
+ cStr = left(cStr,len(cStr)-1)
ok
- cStr += line + nl
- next
-
return cStr
/*
