Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WSH Panel Mod script discussion/help (Read 1400115 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WSH Panel Mod script discussion/help

Reply #576
@romor :

it's a pretty good idea  ... will be added asap!


I have another idea.

why won't you add " drag lrc to control playing progress" capability

pic here

another saying : "Drag lyric of a song controlling the playing progress of a song"

if you know chinese,I will say "??????????"

WSH Panel Mod script discussion/help

Reply #577
I think there is minor foobar or WSH component issue related to AAC encoded files with LYRICS tag (not your script, but why not report it):

text display component vs. WSH lyrics element

also Falstaff can you consider scripts to automagically supply lyrics to your WSH script, as I can make also VBS for lyrdb.com or some other?

WSH Panel Mod script discussion/help

Reply #578
weird, it should works as all other LYRICS tag!

is the tag well named : LYRICS or LYRIC ? Are you sure it's not due to my script ?

to check it, add this line in the script, just after line #634 (tag = lyrics.Eval();)

fb.trace("tag read="+tag);

replay the track to run the script, then check the console to check what's the value returned for tag variable!
if the result is not the whole lyrics text, so, it's probably a WSH component bug with tag in AAC files, BUT if it's correct, it's a bug from my script, so give me the lyrics for me testing and fixing the problem.


WSH Panel Mod script discussion/help

Reply #579
here is console output:

Code: [Select]
Opening track for playback: "C:\Users\Admin\Music\Library\Pink Floyd\Early Singles\08 - Julia Dream.m4a"
tag read=[artist:Pink Floyd][title:Julia Dream][album:Relics][0:08.200]Sunlight bright upon my pillow[0:12.200]Lighter than an eiderdown[0:16.400]Will she let the weeping willow[0:20.600]Wind his branches round[0:26.600]Julia Dream, dreamboat queen, queen of all my dreams[0:36.050][0:37.400]Every night I turn the light out[0:41.400]Waiting for the velvet bride[0:45.600]Will the scaly armadillo[0:49.600]Find me where I'm hiding[0:55.600]Julia Dream, dreamboat queen, queen of all my dreams[1:21.325][1:25.000]Will the misty master break me[1:29.000]Will the key unlock my mind[1:33.200]Will the following footsteps catch me[1:37.200]Am I really dying[1:42.450][1:43.200]Julia Dream, dreamboat queen, queen of all my dreams[1:51.600]Julia Dream, dreamboat queen, queen of all my dreams[2:00.000]Julia Dream, dreamboat queen, queen of all my dreams[2:08.400]Julia Dream, dreamboat queen, queen of all my nightmares[2:17.933][2:34.616]
tag read=[artist:Pink Floyd][title:Julia Dream][album:Relics][0:08.200]Sunlight bright upon my pillow[0:12.200]Lighter than an eiderdown[0:16.400]Will she let the weeping willow[0:20.600]Wind his branches round[0:26.600]Julia Dream, dreamboat queen, queen of all my dreams[0:36.050][0:37.400]Every night I turn the light out[0:41.400]Waiting for the velvet bride[0:45.600]Will the scaly armadillo[0:49.600]Find me where I'm hiding[0:55.600]Julia Dream, dreamboat queen, queen of all my dreams[1:21.325][1:25.000]Will the misty master break me[1:29.000]Will the key unlock my mind[1:33.200]Will the following footsteps catch me[1:37.200]Am I really dying[1:42.450][1:43.200]Julia Dream, dreamboat queen, queen of all my dreams[1:51.600]Julia Dream, dreamboat queen, queen of all my dreams[2:00.000]Julia Dream, dreamboat queen, queen of all my dreams[2:08.400]Julia Dream, dreamboat queen, queen of all my nightmares[2:17.933][2:34.616]
(

WSH Panel Mod script discussion/help

Reply #580
@romor :

it's a pretty good idea  ... will be added asap!

I have another idea.

why won't you add " drag lrc to control playing progress" capability

pic here

another saying : "Drag lyric of a song controlling the playing progress of a song"

if you know chinese,I will say "??????????"

WSH Panel Mod script discussion/help

Reply #581
weird, it should works as all other LYRICS tag!

Falstaff, also this could maybe related to CRLF expectation by your script as posted before. This files that have LYRICS tag and have 0D as line separator:

so on a second thought, it's perhaps related to that issue rather then file format

edit: just try to enter lyrics tag with one long line and see what will happen

WSH Panel Mod script discussion/help

Reply #582
thanks, i understand what's the problem ==> no crlf after each line and lyrics begin with [infos], so, this single line is bypassed! and there is no lyrics to display after ...

==> should be fixed with this update (i test "[" as a line delimiter) : http://pastebin.com/G9fnCnXR

WSH Panel Mod script discussion/help

Reply #583
@romor :

it's a pretty good idea  ... will be added asap!


I have another idea.

why won't you add " drag lrc to control playing progress" capability

pic here

another saying : "Drag lyric of a song controlling the playing progress of a song"

if you know chinese,I will say "??????????"


oops~??????????????????????????
What you suggested is the same as what romor suggested

Falstaff GJ~~
mad messy misanthropist morbid mused


WSH Panel Mod script discussion/help

Reply #585
Hi,
I'm discovering this mod and trying to make a seekbar.
Here is the code I am using, it works well except the bar is kinda green like Windows 7 status bar and I'd prefer it white.
What am I supposed to change to do so ?
Thanks in advance for your support.


Code: [Select]
var g_theme = window.CreateThemeManager("PROGRESS");
var g_bar_height = 4;
var g_cycles = 0;
var ww = 0,
wh = 0;
var top = 0;
var g_pos = 0;
var g_drag = false;
var g_length = 1;

function clamp(x, l, h) {
return (x < l) ? l : ((x > h) ? h : x);
}


function on_size() {
ww = window.Width;
wh = window.Height;
top = (wh - g_bar_height) >> 1;
}

function on_paint(gr) {
g_theme.SetPartAndStateID(1, 0);
g_theme.DrawThemeBackground(gr, 0, top, ww, g_bar_height);

if (fb.IsPlaying && g_length > 0) {
g_theme.SetPartAndStateID(5, fb.IsPaused ? 3 : 1);
g_theme.DrawThemeBackground(gr, 0, top, g_pos, g_bar_height);
}
}

function on_mouse_lbtn_down(x, y) {
if (g_length > 0) {
g_drag = true;
on_mouse_move(x, y);
}
}

function on_mouse_lbtn_up(x, y) {
if (g_length > 0 && g_drag) {
g_drag = false;
fb.PlaybackTime = g_length * g_pos / ww;
on_mouse_move(x, y);
}
}

function on_mouse_move(x, y) {
if (g_drag) {
g_pos = clamp(x, 0, ww);
window.Repaint();
}
}

function on_mouse_wheel(delta) {
fb.PlaybackTime = fb.PlaybackTime + delta * 2;
}

function on_playback_time(time) {
if (!g_drag) {
if (g_length > 0) g_pos = ww * time / g_length;
window.Repaint();
}
}

function on_playback_seek() {
if (!g_drag && g_length > 0) window.Repaint();
}

function on_playback_pause() {
window.Repaint();
}

function on_playback_stop() {
g_length = 0;
g_pos = 0;
g_drag = false;
window.Repaint();
}

function on_playback_new_track() {
g_length = fb.PlaybackLength;
g_pos = 0;
g_drag = false;
window.Repaint();
}

if (fb.IsPlaying) on_playback_new_track();

WSH Panel Mod script discussion/help

Reply #586
Lyriks 1.1 (build 20101021.1105) - a WSH lyrics module by Br3tt

here is a fix, because the last script contains an error in synch when lyrics are read from a file (ok from a tag) :

http://pastebin.com/LJEFwEiu


WSH Panel Mod script discussion/help

Reply #587
I tried to use your script Falstaff, but is it in LRC format that I must have a newline character at the end of my lyrics tag? My unsynced lyrics always has the last line missing.
For example, here's what in my lyrics tag:
Code: [Select]
At the very beginning, we were created, to live
together but soon, we hated in greed
and selfishness we, could never prosper,
created enemies against god's will.

and the last line is replaced by "---" by your code.


WSH Panel Mod script discussion/help

Reply #589
So i bit the bullet and been trying to use code with WSH panel. It's at least far better than the old ways and also far more flexible. I picked up the simple bio script in marc2003 sample pack and modified it a little into this (basically it supports cache life time and I changed the last.fm button feature a little). I hope someone can help me with the flashing tooltip problem. Thanks and marc2003, you were great with these examples to help me pick up using this component.


I fixed my own problem. Basically don't set tooltip text inside the on_mouse_move function.

WSH Panel Mod script discussion/help

Reply #590
Lyriks 1.2 (build 20101023.1300) - a WSH lyrics module by Br3tt

new version of the script (optimized and cleaned)

http://pastebin.com/JsBSZx6v

Next version will have reflection support and will look like this (for now)



WSH Panel Mod script discussion/help

Reply #591
I made an artist art panel based off samples from marc2003. In order to download artist art from correct artist name, I copied and modified the get() and load() functions from simple biography panel into lastfm_load(type) and lastfm_get(lang) and I put them into common.js. The lastfm_load function will set variable lastfm_artist with correct artist from lastfm and fire off an notification but somehow this notification doesn't fire and I'm stuck with my start() function doesn't get called. Please help me.

Relevant  files.

WSH Panel Mod script discussion/help

Reply #592
if you want an album art panel that automatically downloads artist art from last.fm then just modify the "now playing" script (by default it also shows the cover art and song details but you can easily remove this from the on_paint function)

(you might also be interested in the thumbs/thumbs2 scripts as they also download artist art as well)

 

WSH Panel Mod script discussion/help

Reply #593
@romor :

it's a pretty good idea  ... will be added asap!

If user clicks on timestamped lyrics row then seek the track to that position.

I have another idea.

why won't you add " drag lrc to control playing progress" capability

pic here

another saying : "Drag lyric of a song controlling the playing progress of a song"

if you know chinese,I will say "??????????"

WSH Panel Mod script discussion/help

Reply #594
@romor :

it's a pretty good idea  ... will be added asap!

If user clicks on timestamped lyrics row then seek the track to that position.

I have another idea.

why won't you add " drag lrc to control playing progress" capability

pic here

another saying : "Drag lyric of a song controlling the playing progress of a song"

if you know chinese,I will say "??????????"


nope, i prefer : user clicks on timestamped lyrics row then seek the track to that position.

WSH Panel Mod script discussion/help

Reply #595
@romor :

it's a pretty good idea  ... will be added asap!

If user clicks on timestamped lyrics row then seek the track to that position.

I have another idea.

why won't you add " drag lrc to control playing progress" capability

pic here

another saying : "Drag lyric of a song controlling the playing progress of a song"

if you know chinese,I will say "??????????"

nope, i prefer : user clicks on timestamped lyrics row then seek the track to that position.


but not all lines show up. If a line doesn't show ,you click what?  if the window is small, it can show rare ? very little ?lines?or say not too many lines),

so that the lines that you can click is not too much. but Drag can show more lines, becanse it doesn't restricted by the lines that the Lyrik window can show.

WSH Panel Mod script discussion/help

Reply #596
I've finally finished my config with WSH panels. It was pretty fun to do. I based my code on marc2003's, so some credits go to you, Marc2003 for doing the samples. If not for those I wouldn't have known left from right.


Panels code

WSH Panel Mod script discussion/help

Reply #597
Folks who can help me change the default seekbar script to look like on the pic ?




I'm having trouble adjusting "on_mouse_move" after I set the margins. Any idea ? The default script is this

Themed seekbar

WSH Panel Mod script discussion/help

Reply #598
Hi,
I'm discovering this mod and trying to make a seekbar.
Here is the code I am using, it works well except the bar is kinda green like Windows 7 status bar and I'd prefer it white.
What am I supposed to change to do so ?
Thanks in advance for your support.


Code: [Select]
var g_theme = window.CreateThemeManager("PROGRESS");
var g_bar_height = 4;
var g_cycles = 0;
var ww = 0,
wh = 0;
var top = 0;
var g_pos = 0;
var g_drag = false;
var g_length = 1;

function clamp(x, l, h) {
return (x < l) ? l : ((x > h) ? h : x);
}


function on_size() {
ww = window.Width;
wh = window.Height;
top = (wh - g_bar_height) >> 1;
}

function on_paint(gr) {
g_theme.SetPartAndStateID(1, 0);
g_theme.DrawThemeBackground(gr, 0, top, ww, g_bar_height);

if (fb.IsPlaying && g_length > 0) {
g_theme.SetPartAndStateID(5, fb.IsPaused ? 3 : 1);
g_theme.DrawThemeBackground(gr, 0, top, g_pos, g_bar_height);
}
}

function on_mouse_lbtn_down(x, y) {
if (g_length > 0) {
g_drag = true;
on_mouse_move(x, y);
}
}

function on_mouse_lbtn_up(x, y) {
if (g_length > 0 && g_drag) {
g_drag = false;
fb.PlaybackTime = g_length * g_pos / ww;
on_mouse_move(x, y);
}
}

function on_mouse_move(x, y) {
if (g_drag) {
g_pos = clamp(x, 0, ww);
window.Repaint();
}
}

function on_mouse_wheel(delta) {
fb.PlaybackTime = fb.PlaybackTime + delta * 2;
}

function on_playback_time(time) {
if (!g_drag) {
if (g_length > 0) g_pos = ww * time / g_length;
window.Repaint();
}
}

function on_playback_seek() {
if (!g_drag && g_length > 0) window.Repaint();
}

function on_playback_pause() {
window.Repaint();
}

function on_playback_stop() {
g_length = 0;
g_pos = 0;
g_drag = false;
window.Repaint();
}

function on_playback_new_track() {
g_length = fb.PlaybackLength;
g_pos = 0;
g_drag = false;
window.Repaint();
}

if (fb.IsPlaying) on_playback_new_track();


Try lowering or raising the values here

g_theme.SetPartAndStateID(5, fb.IsPaused ? 3 : 1);

Sorry but I dunno if the thememanager contains a progressbar color of white.