Single-line text doesn't have line breaks, whereas multiline text defaults to line breaks. Therefore, defaulting to multiline is feasible.
e2.SendKeys is more stable to use than keys.sendt and Ctrl+V
Because sometimes the window loses focus, resulting in text sending failure.
My apologies for the misunderstanding. The "SendKeys" function below inherently supports multiline text by default(TextShiftEnter = true).
var e2 = w.Elm["web:TEXT", "Message ChatGPT…"].Find(1);
e2.MouseClick(); e2.SendKeys("Ctrl+A", $"!{text}");
e2.SendKeys is more stable to use than keys.sendt and Ctrl+V
Because sometimes the window loses focus, resulting in text sending failure.
My apologies for the misunderstanding. The "SendKeys" function below inherently supports multiline text by default(TextShiftEnter = true).
var e2 = w.Elm["web:TEXT", "Message ChatGPT…"].Find(1);
e2.MouseClick(); e2.SendKeys("Ctrl+A", $"!{text}");