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: JScript Panel script discussion/help (Read 290557 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: JScript Panel script discussion/help

Reply #975
Now I feel dumb. Albeit the marc2003 folder path was wrong or is now wrong or was right in the past but not now. It was all a bit confusing.

Re: JScript Panel script discussion/help

Reply #976
I decided to move from ancient foo_custom to Playback Statistics however when I rate the song in the playlist the rating is being written both to the file and the DB. How can I stop modifying the files?

Re: JScript Panel script discussion/help

Reply #977
It's impossible to say what the problem is when you're not stating the version of fb2k, component version and script.

There were changes during early fb2k v2 betas where playback statistics were built in to fb2k and certain scripts were updated to make use of this. But since fb2k 2.0 beta 18 was released, internal playback statistics were dropped and foo_playcount is once again required. The latest component is compatible with these changes.

https://jscript-panel.github.io/gallery/jsplaylist/#clickable-ratings
https://jscript-panel.github.io/gallery/smooth-playlist/#clickable-ratings


Re: JScript Panel script discussion/help

Reply #978
Heya - Newb here!
i've been reading and trying a bunch of stuff from the docs.

i simply can't seem to grasp if or how it's possible to interact with a component that 1. isn't "supported" by jsp3 and 2. isn't persay open source.
namely the foo_youtube.

 - if it might be possibly to get the list from a search queue as an object etc, to be able to make a customizable interface for the component.

i was able to get it to open the normal "popup search" with fb.RunMainMenuCommand("View/Youtube Source/Search on Site")
and couldn't seem to parse a "metadata" to it like metadata.RunContextCommand("Youtube Source/Search/Songs by this Artist")
don't know if i would need to craft an object looking like metadata with a title for the search string or some.
maybe i would need to decode or Reverse Engineer the foo_youtube to figure it out, but i simply don't know

maybe it's as simply as, it can't be done?


Re: JScript Panel script discussion/help

Reply #980
Hi there,
I'm trying to controle the X location of a button but i dont see any way to succeed.
What i want to achieve is to have that button 50 pixels from the right panel's limit.
The below code doenst work but i'm afraid that even if it did, the button will not set to a correct position if the window is resized.

Code: [Select]
// ==PREPROCESSOR==
// @name "Volume"
// @author "marc2003"
// @import "%fb2k_component_path%helpers.txt"
// @import "%fb2k_component_path%samples\js\lodash.min.js"
// @import "%fb2k_component_path%samples\js\common.js"
// @import "%fb2k_component_path%samples\js\volume.js"
// ==/PREPROCESSOR==

var buttons = new _buttons();
var w, h;

buttons.update = function () {
this.buttons.test = new _button(w-50 , 5 , 50, 40, { char: chars.stop , colour: RGB(255, 255, 0) }, null, function () { console.log('test'); }, 'TT test' );
}

buttons.update();

function on_paint(gr) {
console.log(w);
buttons.paint(gr);
}

function on_size() {
w = window.Width;
h = window.Height;
}
function on_mouse_lbtn_up(x, y) {
if (buttons.lbtn_up(x, y)) {
return;
}
}
function on_mouse_move(x, y) {
if (buttons.move(x, y)) {
return;
}
}

I've been trying to add a parameter to the paint function of _button within "common.js" with 0 success.

Code: [Select]
function _button(x, y, w, h, normal, hover, fn, tiptext) {
this.paint = function (gr, x_start) {
if (this.current) {
gr.WriteText(this.current.char, this.font, this.current.colour, x_start, this.y, this.w, this.h, 2, 2);
}
}

Any help is welcome !

Re: JScript Panel script discussion/help

Reply #981
There are buttons in my track info + seekbar + buttons sample and they always stick to the right hand side of the panel. Should be obvious really...

https://github.com/jscript-panel/component/blob/ddbb875d5fef480c134710009566eaa0fc3f2f57/samples/Track%20Info%20%2B%20Seekbar%20%2B%20Buttons.txt#L178


Re: JScript Panel script discussion/help

Reply #982
indeed, thanks.
I was missing the panel component !

Re: JScript Panel script discussion/help

Reply #983
Coming from here.

I don't mean the text alignment. I mean the font rendering. I think (as a noob) it has something to with GDI versus Directwrite, right? In my screenshot the same font wit the same size looks different and sadly really ugly in the JSP3 Text Display.  :(

Re: JScript Panel script discussion/help

Reply #984
Well there's not a lot I can do about your personal preference. You'll just have to choose not to use it.

BTW, this is Tahoma with GDI on the left (using an old version of JScript Panel2) and DirectWrite on the right. The difference is.... meh.



Not even sure why you're using XP era relic like Tahoma. Segoe UI which has been the default windows font since Vista looks much better.







Re: JScript Panel script discussion/help

Reply #985
All good. Sorry, I don't wanted to bother you. I just asked. :) But in your screenshots it looks pretty similar indeed. Strange...

It think it's a matter of taste. I find Tahoma much more pleasent than Segoe UI as a OS font. Altough it isn't bad at all.

Anyway... thank you very much for answering and your great work here. I really appreciate it. :)

 

Re: JScript Panel script discussion/help

Reply #986
All,
Like others, i was using the playlist_organizer (aka foo_plorg) component until i switched to V2.
As i was missing it, I then tried to redevelop it using JScript Panel 3 functionalities.
I did it originally for myself and i'm far from being a professional developer and as a consequence, this is far from being optimized or well designed or coded correctly.
However it works for me and i'm using it on a daily basis.
There are been a few requests for such a replacement in the playlist_organizer thread but instead of posting there, i decided to post it here, to make sure, i have a few things right (and not all wrong).
the following document contains 3 files :
  • main.js file which is the panel script
  • panel_pl_organizer.js which is a replacement of the panel.js (i simply added a few things)
  • pl_organizer.js which is the main code
The last 2 files should be in the "foo_jscript_panel3\samples\js" folder.

Please let me know if it's ok to spread it as a temporary replacement for the foo_plorg component or should i keep it for myself !

X




Re: JScript Panel script discussion/help

Reply #987
The last 2 files should be in the "foo_jscript_panel3\samples\js" folder.

Nobody should ever be putting their own files in the component folder. This is because they get wiped whenever you upgrade.

You really should be instructing people to extract files to a unique folder inside the user's profile and you can use %fb2k_profile_path% to locate them in the preprocessor section like this....

Code: [Select]
// ==PREPROCESSOR==
// @name "Playlist Manager"
// @author "Seb + inspiration and abstract from marc2003"
// @import "%fb2k_component_path%helpers.txt"
// @import "%fb2k_component_path%samples\js\lodash.min.js"
// @import "%fb2k_component_path%samples\js\common.js"
// @import "%fb2k_profile_path%pl_organizer\panel_pl_organizer.js"
// @import "%fb2k_profile_path%pl_organizer\pl_organizer.js"
// ==/PREPROCESSOR==

edit: you also use fb.ComponentPath as a path for writing a file as well which is bad. Replace with fb.ProfilePath.

Re: JScript Panel script discussion/help

Reply #988
@etip
Hi :)

https://i.imgur.com/MQT2oxt.png

1.) How to change "folder name font size" ? (add to right click)
2.) I want to display both items and size.

Thanks.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #989
Thanks Marc for your advices ! i hope i took them into account.

@Air KEN
i linked the font size menu to both playlists and folders so when you increase the size both should increase. let me know how it works for you.

So now the following zip contains 3 files :
  • main.js file which is the panel script
  • panel_pl_organizer.js which is a replacement of the panel.js (i simply added a few things)
  • pl_organizer.js which is the main code

The last 2 files are to be copied in the fb.ProfilePath + "\pl_organizer" folder
X

Re: JScript Panel script discussion/help

Reply #990
@etip

https://i.imgur.com/eFlDloM.png

fixed.
The font size changes for both the playlist name and folder name.

Many Thanks.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #991
@etip
additional request:

1.) Playlist multiple selection
2.) mouse action (Double click, Middle button)
3.) Context menu (Playlist view)
4.) I want to display both items and size.

Thanks.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #992
@Airken
Thanks for the feedback.
I'll think about the multiple selection but tbh, i dont really get your points 2 and 3. What would want to achieve with the double click/middle button and what would you want in the context menu ?

Re: JScript Panel script discussion/help

Reply #993
@etip
Thank you for your reply.

2.) mouse action (Double click, Middle button)
Send to Playlist or Play etc...
Like other Playlist Panels

3.) Context menu (Playlist view)
Playlist view context menu:
Utilities > Send to playlist... , Add to playback queue, Tagging and Prpperties etc...
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #994
3) should be built in to Smooth Playlist Manager / JSplaylist as well. I'll look at adding this.

edit: it's been done, etip can look at this if you want...

https://github.com/jscript-panel/component/commit/dc38b897badd7973d5b65313a5e0b7004aa567ac

Re: JScript Panel script discussion/help

Reply #995
@marc2k3 Thanks.

Smooth Playlist Manager (+ itemes > context menu)
https://i.imgur.com/1P2hXaz.png

Is it possible to add a group division function by Folder to Smooth Playlist Manager?
It is luxurious for user to be able to select "Playlist Organizer" and "Smooth Playlist Manager".

Thanks.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #996
Someone could do it but I will not. I rarely if ever have more than 2-3 playlists on the go at once. Most of the time it's double click an album from Smooth Browser>send to playlist and play. Yes, I'm so boring that I generally listen to albums in their entirety before moving on to the next.

Re: JScript Panel script discussion/help

Reply #997
so i added the context menu (thanks @marc2k3)
i also added both Size and # of files in a playlist. The switch button in the top right corner switches between the # of files to the # of files + the size (i wont be using this so i took a shortcut).

Not sure i'll do the multiple selection because it's a significant change and i just dont have the courage right now.

The following zip contains 3 files :
main.js file which is the panel script
panel_pl_organizer.js which is a replacement of the panel.js (i simply added a few things)
pl_organizer.js which is the main code

The last 2 files are to be copied in the fb.ProfilePath + "\pl_organizer" folder

X

Re: JScript Panel script discussion/help

Reply #998
Hi! I installed the JPEG XL WIC extensions and now I have thumbnails + Windows Photo Viewer support for JPEG XL, but the album art JSPanel still won't shot a cover.jpx album art. Should the detection of the WIC extension be automatic?

Re: JScript Panel script discussion/help

Reply #999
It should but work but there are 2 things to note:

-It only works with 64bit fb2k 2.0. AFAIK, there is no 32bit version of the JXL DLL. In addition to working with the 64bit version of this component, it should also work with default UI and Columns UI.
-The album art preferences must explicitly specify the file extension. Wildcards won't work.