Link Scripts output to window in Xcode(Please help)

13

Good day All .

I would like to ask for assistance
i would like to run these two scripts and then the output i would like to display in the field userName and computerName.

set userName to (do shell script “whoami”)
set computerName to (do shell script “system_profiler SPHardwareDataType | awk ‘/Serial/ {print $4}’”)

Thanks
Eugene