Posts: 97
Threads: 27
Joined: May 2023
Hi dear Gintaras:
I have a question for you, I would like to get the timestamp of each bar. Would it be able to do it with the help of LA?
https://chordify.net/chords/neil-young-s...d-2-chords
The currentTime of each bar is the number starting with 1 5 9 13 ..... because they are the starting point of each measure!
My goal is to get the timestamp without clicking the starting chord of each bar one by one. Is there a solution to get them all in one second? And probably store them in a csv or txt file.
Thank you so very much!
Posts: 12,095
Threads: 142
Joined: Dec 2002
Can automate clicking "Copy video URL at current time" to get the current second. I don't know how to get time with better resolution.
print.clear();
var w1 = wnd.find(0, "*- Chordify - Google Chrome", "Chrome_WidgetWin_1");
w1.Activate(); 200.ms();
for (int i = 0; i < 100; i++) {
//perf.first();
var e1 = w1.Elm["web:GROUPING", "YouTube Video Player"].Find(1);
//e1.MouseClickR();
e1.PostClickR();
var e2 = w1.Elm["web:MENUITEM", "Copy video URL at current time"].Find(1);
clipboard.clear();
e2.Invoke();
var s = wait.until(1, () => clipboard.text);
//perf.nw();
print.it(s);
250.ms();
}
Posts: 97
Threads: 27
Joined: May 2023
Thank you so much!
var w1 = wnd.find(0, "*- Chordify - Google Chrome", "Chrome_WidgetWin_1");
w1.Activate(); 200.ms();
var elements = w1.Elm["web:GROUPING", prop: "@data-i=?*"].FindAll()[1..];
for (int i = 0; i < elements.Count(); i += 4)
{
var e = elements[i];
e.PostClick();
0.3.s();
keys.send("space");
var e1 = w1.Elm["web:GROUPING", "YouTube Video Player"].Find(1);
e1.PostClickR();
var e2 = w1.Elm["web:MENUITEM", "Copy video URL at current time"].Find(1);
clipboard.clear();
e2.Invoke();
var s = wait.forCondition(1, () => clipboard.text);
250.ms();
print.it(s);
}
This is working perfectly!
Jscript :
const video = document.querySelector("#movie_player > div.html5-video-container > video");
// Set focus on the video element
video.focus();
// Get the current playback time
const currentTime = video.currentTime;
console.log("Current playback time:", currentTime); This JavaScript will read the current time.
Would you please help me integrate this two code into one. I don’t know if LA is able to run JavaScript code directly! Thank you so much