Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use clipborad.text to insert text fast?
#2
Code:
Copy      Help
// script ""
//https://intelx.io/tools?tab=youtube      This site helps to get the upload and other information
//https://www.youtube.com/@laofangDDD/videos    This is the site I will use to extract video information


print.clear();

var csv = new csvTable();
var w = wnd.find(1, "老房叨叨叨 - YouTube - Google Chrome", "Chrome_WidgetWin_1");
var x = wnd.find(1, "Tools - Intelligence X - Google Chrome", "Chrome_WidgetWin_1");
x.Activate();
var z = x.Elm["web:GROUPING", prop: "@id=ytshortOutput"].Find(1);
string prev = z.Elm["STATICTEXT", "Video ID:*\nViews:*"].Find()?.Name; //prevent getting old result
opt.key.KeySpeed = 1;
foreach (var e in w.Elm["web:LINK", "* by 老房叨叨叨 *"].FindAll()) {
    var e2 = x.Elm["web:TEXT", "Enter YouTube Video URL"].Find(1);
    e2.SendKeys("Ctrl+A", $"!{e.Value}", "Enter");
    
    //this is the slow part, ~180 ms. The speed depends on the website+browser. Canot make faster, but can make reliable at the best possible speed.
    //perf.first();

    100.ms();
    g1: var metadata = z.Navigate("ch6 fi");
    var s = metadata?.Name;
    if (s == null || s == prev || !s.Like("Video ID:*\nViews:*")) { 10.ms(); goto g1; }
    prev = s;
    //perf.nw();
    
    var a = s.Lines();
    var data = a[1].Split(":")[1].TrimStart();
    var view = a[10].Split(":")[1].TrimStart();
    var cells = new string[] { e.Value, z.Navigate("fi2").Name, data, view };
    //print.it(cells);
    csv.AddRow(cells);
}

print.it(csv);
//csv.Save(folders.Desktop + "老房叨叨叨.csv");


Messages In This Thread
RE: How to use clipborad.text to insert text fast? - by Gintaras - 05-16-2023, 02:37 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)