His remarks in Scotland didn’t seem very helpful. It parallels how after the Orlando massacre the first thing he said was how people were “congratulating” him.
Trump's "tell it like it is" speaking style has gotten him to where he is now but there are times, particularly after major events, when he really needs to sit down and carefully craft an articulate response.
Your two examples are times when Trump left me scratching my head wondering, "did he really just say that?"