Xojo not getting the value returned by the AppleScript

You can add a script in the Xojo Build:
Right click on “macOS” in “Build Settings”, then “Add to ‘Build settings’” - “Build Step” - “Script”.
In this script paste the code:

If (CurrentBuildTarget = 7) or (CurrentBuildTarget = 16) Then ' Mac OS 32bit ou Mac OS 64bit
  Dim TpTextA, TpTextB, TpTxtErr as String ' https://www.mbsplugins.de/archive/2019-03-31/Required_keys_for_infoplist_fi
  
  ' OpenFile(CurrentBuildLocation) ' "c:\projects\IDEScriptTest.xojo_binary_project")
  ' OpenFile(CurrentBuildLocationNative)
  ' OpenFile("/Volumes/MBtom-HD2/Tampon/TextBatchConv.app/Contents/Resources/fr.lproj/Localizable.strings") ' Ouvre dans l'IDE
  
  ' Mac for Test : TpTextA = CurrentBuildLocationNative + "/" + CurrentBuildAppName + "/Contents/Resources/fr.lproj/Localizable.strings" ' NativePath
  
  TpTextA = CurrentBuildLocation + "/" + CurrentBuildAppName ' + ".app"
  
  ' Print(ProjectShellPath)
  
  TpTxtErr = ""
  ' ####################
  TpTextB = DoShellCommand("/usr/bin/defaults write " + TpTextA + "/Contents/Info ""NSAppleEventsUsageDescription"" ""Modify folder window view, Add login item, Make alias, Select item.""")
  If not(TpTextB = "") Then
    If TpTxtErr = "" Then
      TpTxtErr = TpTextB
    Else
      TpTxtErr = TpTxtErr + EndOfLine + TpTextB
    End If
  End If
  ' ####################
  TpTextB = DoShellCommand("/usr/bin/defaults write " + TpTextA + "/Contents/Info ""NSContactsUsageDescription"" ""Read Contacts in your AddressBook.""")
  If not(TpTextB = "") Then
    If TpTxtErr = "" Then
      TpTxtErr = TpTextB
    Else
      TpTxtErr = TpTxtErr + EndOfLine + TpTextB
    End If
  End If
  ' ####################
  If not(TpTxtErr = "") Then Print(TpTxtErr)
End If

There are 2 Plist modifications between the 3 “####################”. The first one is to allow Applescript in your application, the 2nd is to allow it to access AddressBook.
I modify this script from what I copied here in the Xojo forum with the help of the members.