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 1376258 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

WSH Panel Mod script discussion/help

Reply #1600
Hey,

If possible I would like to be able to get the IFbMetadbHandle for the item that will become the playing item when playback is started.

Let's imagine that I have a playlist containing tracks A, B and C and that I also have cursor follows playback and playback follows cursor disabled. I currently have track A selected and I'm actually playing track B. Then I hit stop and, after the playback stops, I restart foobar. When I hit play, track B will be played again.

I wish to get the IFbMetadbHandle for track B on start-up. So before playback is started and regardless of whether another track, such as A, is selected - is this possible and how?

Cheers

WSH Panel Mod script discussion/help

Reply #1601
is there any way to get info from embedded cue in playlist?

WSH Panel Mod script discussion/help

Reply #1602
@Falstaff

Using WSH Playlist Viewer 2.0. I have the Group Header set to 3 lines so tracks, codec, genre line shows. If the stream is WMA V2 then the codec shows as ? (question mark). Codec shows up okay in the status bar (codec & codec profile). MP3 and AAC look okay.

Is this just my computer? Also is it possible to have that line as black text instead of grey?

Thank you.


WSH Panel Mod script discussion/help

Reply #1604
@Falstaff

These 3 radios streams do it

mms://streaming.sbsradio.se/03872_Studio_low
mms://81.173.117.102/ArrowAudio01
mms://81.173.117.102/ArrowAudio02

Thank you.

WSH Panel Mod script discussion/help

Reply #1605
Thanks, T.P. Wang.

I am wondering if there a way to change mp3 these tags by foobar?
ex. plman.SetPlaylistSelectionTag(target, val)
or XXX.SetProperty(name, val)


Is there anyone can help me?
Thank you!

 

WSH Panel Mod script discussion/help

Reply #1606
look at UpdateFileInfoSimple in interfaces.txt


WSH Panel Mod script discussion/help

Reply #1608
look at UpdateFileInfoSimple in interfaces.txt

Is it can only be uses in one song at one time?
Can it be able to use in multi-song at one time?

WSH Panel Mod script discussion/help

Reply #1609
you could loop through an array of items something like this...

Code: [Select]
items = plman.GetPlaylistSelectedItems(plman.ActivePlaylist);
for (i = 0; i < items.count; i++) {
    items.item(i).UpdateFileInfoSimple("title", "test");
}

WSH Panel Mod script discussion/help

Reply #1610
I've updated my vertical volume bar script so that the tooltip showing the volume will update while the mouse-wheel is being scrolled on the bar. Code below 

Code: [Select]
// ==PREPROCESSOR==
// @name "Volume-bar with tooltip"
// @author "rawny"
// ==/PREPROCESSOR==

// Based somewhat on:
// -> "Volbar with GdiDrawText" by T.P Wang
// -> "Simple Seekbar" by marc2003

var a = 25;
var g_drag = 0;
var g_drag_seek = 0;
var g_tooltip = window.CreateTooltip();
var g_trackingMouse = false;
var old_x;
var old_y;

function RGB(r, g, b) {
    return (0xff000000 | (r << 16) | (g << 8) | (b));
}

function RGBA(r, g, b, a) {
    return ((a << 24) | (r << 16) | (g << 8) | (b));
}

function on_size() {
    ww = window.Width;
    wh = window.Height;
}

function on_paint(gr){
    var ww = window.Width;
    var wh = window.Height;
    var pos = 0;
    var volume = fb.Volume;
    if(g_drag){
        pos = wh * g_drag_seek;
    }else{
        pos = wh * Math.exp(fb.Volume/a);
    }
    gr.FillGradRect(0, wh-pos, ww, wh, 90, RGB(0,0,255), RGB(70,90,200));
    gr.FillGradRect(0, 0, ww, wh-pos, 90, RGB(0,0,0), RGB(50,50,50));
    gr.DrawRect(0,0, ww-1, wh-1, 1.0, RGB(100,100,100));
}

function on_mouse_move(x,y){
    // Set the cursor to the hand symbol:
    window.SetCursor(32649); 
    g_drag_seek = 1-y/wh;
    g_drag_seek = (g_drag_seek<Math.exp(-100/a)) ? Math.exp(-100/a) : (g_drag_seek<1) ? g_drag_seek : 1;
    if(x > ww){
        g_drag = 0;
    }
    if(g_drag){
        window.Repaint();
    }
    if(!g_trackingMouse){
        g_tooltip.Activate();
        g_tooltip.TrackActivate = true;
        g_trackingMouse = true;
    }
    if(x != old_x || y != old_y){
        txt = Math.ceil(a*Math.log(g_drag_seek))+"dB ("+Math.ceil(g_drag_seek*100)+"%)";
        g_tooltip.Text = txt;
        g_tooltip.TrackPosition(x+10,y-10); 
        old_x = x;
        old_y = y;
    }
}

function on_mouse_leave(){
    g_trackingMouse = false;
    g_tooltip.TrackActivate = false;
}

function on_mouse_lbtn_down(x,y){
    g_drag = 1;
}
function on_mouse_lbtn_up(x,y){
    if(!g_drag){
        return;
    }
    g_drag = 0;
    var v = 1-y/wh;
    v = (v<Math.exp(-100/a)) ? Math.exp(-100/a) : (v<1) ? v : 1;
    fb.Volume = a*Math.log(v);
}
function on_mouse_wheel(delta){
    if(delta>0){
        fb.VolumeUp();
    }else{
        fb.VolumeDown();
    }
    g_tooltip.Text = Math.ceil(fb.Volume)+"db ("+Math.ceil((Math.exp(fb.Volume/a))*100)+"%)"; 
    var ttY = wh-(wh * Math.exp(fb.Volume/a)); 
    g_tooltip.TrackPosition(10, ttY-8); 
}

function on_volume_change(val){
    window.Repaint();
}

WSH Panel Mod script discussion/help

Reply #1611
you could loop through an array of items something like this...

Code: [Select]
items = plman.GetPlaylistSelectedItems(plman.ActivePlaylist);
for (i = 0; i < items.count; i++) {
    items.item(i).UpdateFileInfoSimple("title", "test");
}

Thank you!
Can you tell me why GetPlaylistSelectedItems need to use count and item?
I have used following codes yesterday:
Code: [Select]
var items = plman.GetPlaylistSelectedItems(plman.ActivePlaylist);
    for (i=0; i<items.length; i++) {
        items[i].UpdateFileInfoSimple("title", "test");
    }

But nothing happen.


WSH Panel Mod script discussion/help

Reply #1612
from the docs...

Code: [Select]
interface IFbMetadbHandleList
{
Properties:
    (readonly) uint Count;
    // [1.5.0 Preview 6]: Changed, now writable.
    (read, write) IFbMetadbHandle Item(idx);
...
}

WSH Panel Mod script discussion/help

Reply #1613
from the docs...

Code: [Select]
interface IFbMetadbHandleList
{
Properties:
    (readonly) uint Count;
    // [1.5.0 Preview 6]: Changed, now writable.
    (read, write) IFbMetadbHandle Item(idx);
...
}

Thank you, and sorry for stupid questions.
I never learn programming language from teachers or books.
I even can't understand whole files in docs very well.
So, I'm very appreciate your teaching.
When I have other questions can I ask you by PM?
Thank you!

WSH Panel Mod script discussion/help

Reply #1614
it's better to ask questions in this thread. other people can answer and also others can learn if they get stuck doing the same kind of thing.

WSH Panel Mod script discussion/help

Reply #1615
Given a reference to a track (e.g. the currently playing track), is there any way to get an IFbMetadbHandleList of the group that it resides in within EsPlaylist?

Edit: I guess my best alternative option is to fake it by having the script create an autoplaylist based on the same query that forms the group. Unless anyone can think of any better ideas?

WSH Panel Mod script discussion/help

Reply #1616
it's better to ask questions in this thread. other people can answer and also others can learn if they get stuck doing the same kind of thing.

XD But my questions are very stupid, isn't it?

The new question is:
Can we change .txt or .lrc in WSH Panel Mod script?
I want to replace some words in .txt or .lrc files.

WSH Panel Mod script discussion/help

Reply #1617
@Falstaff
WSH Playlist Viewer  2.0.1
Thanks for the awful nice item for DUI very nicely in the "se7en", but in XP selected mouse line has completely white background (I have a dark theme and it is very contrasting).

what part of the code, you can assign a color to the selected row?

WSH Panel Mod script discussion/help

Reply #1618
@San_dr

you know there are options in my script? Just disable Themed style in settings! untick this menu item :

WSH Panel Mod script discussion/help

Reply #1619
@San_dr
you know there are options in my script? Just disable Themed style in settings! untick this menu item :


Now re-unpacked wsh_playlist_viewer_v2_0_1_by_br3tt-d4se96u.zip and applied the "pure" script. But no change. This may not be related to the settings XP? In the "7" gray highlighted line (with a black background). And I want to ask - in the properties panel, the first item *USER.background.image.enabled - True
Do I understand that you can add your background picture? I can not do it. Desired image background.jpg 800x600 placed in Foobar2000\images...
Thanks for the prompt

WSH Panel Mod script discussion/help

Reply #1620
on your screenshot, "USe Themed Style" is ticked, so it's normal that you have a styled lined (white), so just untick it, and show me the result please, normally, no more white background line ==> ok?

WSH Panel Mod script discussion/help

Reply #1621

WSH Panel Mod script discussion/help

Reply #1622
i need to collect some statistics, so i need a kind of database. can i somehow connect with sql base or i can store data in text files without longer search time?

toSan_dr are you russian too?


WSH Panel Mod script discussion/help

Reply #1624
When I try and rename my playlist tabs or sort the playlist, WSH mod crashes. Using foobar 1.1.11 wsh panel mod 1.5.3.1 any help would be appreciated