Hello,
Xojo Version 2019 Release 1, macOS Catalina Version 10.15.7
I have this method which returns a string but the returned string is in quotes.
Msgbox "TheSerialNumberString is " + TheSerialNumberString
TheSerialNumberString is “C07P70SAG1J2”
I was expecting
TheSerialNumberString is C07P70SAG1J2
Why is that?
Public Function SystemSerialNumber() as String
dim sh as New Shell
Dim y as String
#If TargetWin32 Then
sh.TimeOut = 3000
sh.execute(“wmic bios get serialnumber”)
return trim(NthField( sh.Result, “SerialNumber”, 2 ))
#ElseIf TargetMacOS Then
sh.Execute(“ioreg -l | grep IOPlatformSerialNumber|awk ‘{print $4}’”)
y = sh.result
y = replace(y,"<"+chr(34),"")
y = replace(y,chr(34) + “>”,"")
return y
#EndIf
If sh.ErrorCode = 0 then return (sh.Result)
End Function
Thanks.
Lennox