Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the last message in Google Chrome browser
#4
Or click the Copy button. It gets markdown text.

Code:
Copy      Help
// script ""
print.clear();

var w = wnd.find(1, "ChatGPT - Google Chrome", "Chrome_WidgetWin_1");
var e = w.Elm["web:GROUPING", prop: "@data-message-author-role=assistant", flags: EFFlags.Reverse, navig: "ne2 fi"].Find(1); //the navig finds the Copy button
clipboard.clear();

//e.Invoke(); //does not work
if (e.IsOffscreen) {
    e.ScrollTo();
    wait.until(3, () => !e.IsOffscreen);
    500.ms();
}

e.MouseClick();

var s = wait.until(3, () => clipboard.text);
print.it(s);


Messages In This Thread
RE: How to get the last message in Google Chrome browser - by Gintaras - 03-02-2024, 10:10 AM

Forum Jump:


Users browsing this thread: 10 Guest(s)