WSH Panel Mod script discussion/help. |
![]() ![]() |
WSH Panel Mod script discussion/help. |
May 9 2012, 15:41
Post
#1601
|
|
|
Group: Members Posts: 30 Joined: 27-January 09 Member No.: 66042 |
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 This post has been edited by rawny: May 9 2012, 15:52 |
|
|
|
May 9 2012, 16:09
Post
#1602
|
|
|
Group: Members Posts: 40 Joined: 30-September 11 Member No.: 94073 |
is there any way to get info from embedded cue in playlist?
|
|
|
|
May 10 2012, 00:09
Post
#1603
|
|
|
Group: Members Posts: 29 Joined: 22-February 10 Member No.: 78388 |
@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. |
|
|
|
May 10 2012, 11:15
Post
#1604
|
|
![]() Group: Members Posts: 2771 Joined: 12-November 06 Member No.: 37463 |
@amalone
have you and @ of WMA stream for me testing please? -------------------- http://br3tt.online.fr/
|
|
|
|
May 10 2012, 14:29
Post
#1605
|
|
|
Group: Members Posts: 29 Joined: 22-February 10 Member No.: 78388 |
@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. |
|
|
|
May 11 2012, 15:56
Post
#1606
|
|
|
Group: Members Posts: 22 Joined: 11-May 12 Member No.: 99730 |
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! This post has been edited by matif: May 11 2012, 16:26 |
|
|
|
May 11 2012, 16:19
Post
#1607
|
|
![]() Group: Members Posts: 3291 Joined: 27-January 05 From: England Member No.: 19379 |
look at UpdateFileInfoSimple in interfaces.txt
|
|
|
|
May 11 2012, 16:43
Post
#1608
|
|
|
Group: Members Posts: 22 Joined: 11-May 12 Member No.: 99730 |
|
|
|
|
May 11 2012, 19:24
Post
#1609
|
|
|
Group: Members Posts: 22 Joined: 11-May 12 Member No.: 99730 |
|
|
|
|
May 11 2012, 20:42
Post
#1610
|
|
![]() Group: Members Posts: 3291 Joined: 27-January 05 From: England Member No.: 19379 |
you could loop through an array of items something like this...
CODE items = plman.GetPlaylistSelectedItems(plman.ActivePlaylist);
for (i = 0; i < items.count; i++) { items.item(i).UpdateFileInfoSimple("title", "test"); } |
|
|
|
May 12 2012, 08:53
Post
#1611
|
|
|
Group: Members Posts: 30 Joined: 27-January 09 Member No.: 66042 |
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 // ==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(); } This post has been edited by rawny: May 12 2012, 08:54 |
|
|
|
May 12 2012, 09:05
Post
#1612
|
|
|
Group: Members Posts: 22 Joined: 11-May 12 Member No.: 99730 |
you could loop through an array of items something like this... CODE 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 var items = plman.GetPlaylistSelectedItems(plman.ActivePlaylist); for (i=0; i<items.length; i++) { items[i].UpdateFileInfoSimple("title", "test"); } But nothing happen. |
|
|
|
May 12 2012, 09:14
Post
#1613
|
|
![]() Group: Members Posts: 3291 Joined: 27-January 05 From: England Member No.: 19379 |
from the docs...
CODE interface IFbMetadbHandleList
{ Properties: (readonly) uint Count; // [1.5.0 Preview 6]: Changed, now writable. (read, write) IFbMetadbHandle Item(idx); ... } |
|
|
|
May 12 2012, 15:59
Post
#1614
|
|
|
Group: Members Posts: 22 Joined: 11-May 12 Member No.: 99730 |
from the docs... CODE 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! This post has been edited by matif: May 12 2012, 16:00 |
|
|
|
May 12 2012, 18:03
Post
#1615
|
|
![]() Group: Members Posts: 3291 Joined: 27-January 05 From: England Member No.: 19379 |
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.
|
|
|
|
May 13 2012, 20:45
Post
#1616
|
|
|
Group: Members Posts: 30 Joined: 27-January 09 Member No.: 66042 |
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? This post has been edited by rawny: May 13 2012, 21:01 |
|
|
|
May 16 2012, 18:12
Post
#1617
|
|
|
Group: Members Posts: 22 Joined: 11-May 12 Member No.: 99730 |
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. |
|
|
|
May 17 2012, 08:33
Post
#1618
|
|
|
Group: Members Posts: 8 Joined: 4-December 11 Member No.: 95581 |
@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? |
|
|
|
May 17 2012, 08:48
Post
#1619
|
|
![]() Group: Members Posts: 2771 Joined: 12-November 06 Member No.: 37463 |
@San_dr
you know there are options in my script? Just disable Themed style in settings! untick this menu item :
This post has been edited by Falstaff: May 17 2012, 08:49 -------------------- http://br3tt.online.fr/
|
|
|
|
May 17 2012, 09:49
Post
#1620
|
|
|
Group: Members Posts: 8 Joined: 4-December 11 Member No.: 95581 |
@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 This post has been edited by San_dr: May 17 2012, 09:51 |
|
|
|
May 17 2012, 10:30
Post
#1621
|
|
![]() Group: Members Posts: 2771 Joined: 12-November 06 Member No.: 37463 |
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?
-------------------- http://br3tt.online.fr/
|
|
|
|
May 17 2012, 11:43
Post
#1622
|
|
|
Group: Members Posts: 8 Joined: 4-December 11 Member No.: 95581 |
![]() Yes, white illumination gone, but now is very small (for me) is the difference between the normal and the selected line. I think in some places, trying to become the black blacker than black. I think the script is more optimized for the white. For example here (Line 674) if(list.gradient_lines_show) { gr.FillGradRect(this.x+30, this.y, this.w-vscrollbar.w-60, 1, 0, 0, RGBA(0,0,0,80), 0.5); gr.FillGradRect(this.x+30, this.y+1, this.w-vscrollbar.w-60, 1, 0, 0, RGBA(255,255,255,15), 0.5); for white and black - different gradients, which leads to this result. And what about the background picture? |
|
|
|
May 17 2012, 14:59
Post
#1623
|
|
|
Group: Members Posts: 40 Joined: 30-September 11 Member No.: 94073 |
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? |
|
|
|
May 17 2012, 16:11
Post
#1624
|
|
|
Group: Members Posts: 8 Joined: 4-December 11 Member No.: 95581 |
QUOTE (romka18) San_dr[/b] are you russian too? Да,Ромка. Харьков. Заходь http://foobar2000.0pk.ru/viewtopic.php?id=392 (Yes, 'romka18', Kharkov, come in) |
|
|
|
May 18 2012, 14:30
Post
#1625
|
|
|
Group: Members Posts: 75 Joined: 23-May 10 Member No.: 80861 |
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
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 23:44 |