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 299929 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: JScript Panel script discussion/help

Reply #1100
Thank you for responding and explaining. I've been using selected_background_colour as g_color_selection for a while now.
Actually, I was trying to always find the light accent, as I'm trying to match it with the dark blur background for the tracks. So the question would be how to always calculate Luminance from dark background or RGB(0,0,0). I tried to emulate using the calculation from the GetNowPlayingColours diff, but had no luck and since this just a minor issue, I might try it again later.

Anyway, I have another question that has been bugging me for a while.
When I set the g_colour_text from GetNowPlayingColours as the button colour, it took about 4 seconds for the button to update the colour when I selected and started a new track.

I have already added the buttons.update() to some function, but several functions, such as on_playback_new_track, on_item_focus_change, and on_colors_changed, returned an error.
Object doesn't support property or method 'update'

The metadb are set to fb.GetNowPlaying. When set to fb.GetFocusItem, it does change on the fly when selecting a new track but as expected it doesn't get the colour for next track, although it can be passed by activating the cursor follow playback.


Re: JScript Panel script discussion/help

Reply #1101
I'm asking for help.

I display my covers in JScript Panel3 / Album Art.
When I place the cursor over the displayed cover, a pop-up window always appears with information about the cover (see appendix).

How can I turn off this pop-up window?

Sorry for my english. It's google translate.


Re: JScript Panel script discussion/help

Reply #1103
Excellent. Thanks for the quick help.

Re: JScript Panel script discussion/help

Reply #1104
I have been using the DarkOne4Mod on foobar for a long time since I've been on Windows. I was on the initial version of the theme all the way to the current version and it uses the JScript component to load most of the panels in the layout.
I have now moved to Linux (ZorinOS) and I'm having trouble getting one particular panel to show up.
I attached a photo to show exactly what I mean.
I think I'm encountering the error/crash due to some font differences between Linux and Windows.
Can someone help me out as to what to edit in the Panel settings to get this to work please?

Console:
Error: JScript Panel (DarkOne4Mod - Display Panel v1.0 build20160929 by super-gau and tedGo, includes partial codes by fbuser, Br3tt and T.P Wang): Invalid parameter.  File: <main>
Line: 184, Col: 3
<source text only available at compile time>

I thought one of those variables was not initialized but my trying to solve it myself didn't work so far.
JScript panel version: 1.1.6
Foobar version: 2.0 (x86) running via PlayOnLinux

Re: JScript Panel script discussion/help

Reply #1105
Console:
Error: JScript Panel (DarkOne4Mod - Display Panel v1.0 build20160929 by super-gau and tedGo, includes partial codes by fbuser, Br3tt and T.P Wang): Invalid parameter.  File: <main>
Line: 184, Col: 3
<source text only available at compile time>

I thought one of those variables was not initialized but my trying to solve it myself didn't work so far.
JScript panel version: 1.1.6
Foobar version: 2.0 (x86) running via PlayOnLinux

Does Linux have Microsoft Sans Serif font? If not, type in one you do have. (Try Arial Black) It still shouldn't crash, however. At least it wouldn't in Windows.

Or delete the line or put a // in front of it and see what happens.

I suggest downloading the latest non modded Darkone here...

https://foobar-users.de/index.php?topic=4851.0

Re: JScript Panel script discussion/help

Reply #1106
Thank you for responding and explaining. I've been using selected_background_colour as g_color_selection for a while now.
Actually, I was trying to always find the light accent, as I'm trying to match it with the dark blur background for the tracks. So the question would be how to always calculate Luminance from dark background or RGB(0,0,0). I tried to emulate using the calculation from the GetNowPlayingColours diff, but had no luck and since this just a minor issue, I might try it again later.

Anyway, I have another question that has been bugging me for a while.
When I set the g_colour_text from GetNowPlayingColours as the button colour, it took about 4 seconds for the button to update the colour when I selected and started a new track.

I have already added the buttons.update() to some function, but several functions, such as on_playback_new_track, on_item_focus_change, and on_colors_changed, returned an error.
Object doesn't support property or method 'update'

The metadb are set to fb.GetNowPlaying. When set to fb.GetFocusItem, it does change on the fly when selecting a new track but as expected it doesn't get the colour for next track, although it can be passed by activating the cursor follow playback.



Hello,

How did you arrange the tabs in two rows? What I mean is the point where you have icons above and captions below (Console, New Tab, etc.).


Re: JScript Panel script discussion/help

Reply #1107
Hello,

How did you arrange the tabs in two rows? What I mean is the point where you have icons above and captions below (Console, New Tab, etc.).


Hello there,
Make sure to first install the font (icon) you want to use. I'm using Microsoft's Segoe Fluent Icons font for this one. Download Link
Then, using the Character Map app, you may view and select it.


Re: JScript Panel script discussion/help

Reply #1108
Console:
Error: JScript Panel (DarkOne4Mod - Display Panel v1.0 build20160929 by super-gau and tedGo, includes partial codes by fbuser, Br3tt and T.P Wang): Invalid parameter.  File: <main>
Line: 184, Col: 3
<source text only available at compile time>

I thought one of those variables was not initialized but my trying to solve it myself didn't work so far.
JScript panel version: 1.1.6
Foobar version: 2.0 (x86) running via PlayOnLinux

Does Linux have Microsoft Sans Serif font? If not, type in one you do have. (Try Arial Black) It still shouldn't crash, however. At least it wouldn't in Windows.

Or delete the line or put a // in front of it and see what happens.

I suggest downloading the latest non modded Darkone here...

https://foobar-users.de/index.php?topic=4851.0

Yeah thanks. Commenting it out worked to remove the error, but left a blank panel
But changing the font to one that I did have worked perfectly. I had to use FreeSerif which is close enough to the size of what Microsoft Sans Serif would've been.
You're the man, and thanks again.
Merry Christmas (:

Re: JScript Panel script discussion/help

Reply #1109
Hello,

How did you arrange the tabs in two rows? What I mean is the point where you have icons above and captions below (Console, New Tab, etc.).


Hello there,
Make sure to first install the font (icon) you want to use. I'm using Microsoft's Segoe Fluent Icons font for this one. Download Link
Then, using the Character Map app, you may view and select it.



Thank you! One more question - is it possible to darken the area (or change the color) that I marked on the screenshot? https://imgbox.com/bJx5uR3l

Re: JScript Panel script discussion/help

Reply #1110
@ms1602
That's a very good lookin' .mp4 screendump!
What program did you use for that?
What is the opposite of music?


Re: JScript Panel script discussion/help

Reply #1112
Thank you! One more question - is it possible to darken the area (or change the color) that I marked on the screenshot? https://imgbox.com/bJx5uR3l
For the time being, I don't believe that is possible on the Default UI. ColumnsUI can do it, however you may have to change and compile the component from source yourself.
For the JScript panel part, it can be done.

Re: JScript Panel script discussion/help

Reply #1113
@marc2k3
I always enjoy using it. thank you.

v3.3.8
"Album Art + Text Display" sample

Are the following options no longer available?
- Context menu > Horizontal alignment/Vertical alignment

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, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #1114
Yep, no alignment options. There's a note in the script if you look in the panel or the online copy here...

https://github.com/jscript-panel/component/blob/96dd92ef8890cf3554ec59810d608c40bf4aa6be/samples/Album%20Art%20%2B%20Text%20Display.txt#L12-L20

Whatever mods you had previously will continue to work so keep using them if needed. There have not been any changes to the underlying .js files.

Re: JScript Panel script discussion/help

Reply #1115
got it. thank you.
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, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #1116
@marc2k3
Isn't "%codec_long%" field supported?

for example:
%codec% Monkey's Audio → %codec_long% Monkey's Audio / High

Foobar2000:Version 2.1 Preview Change Log
2023-06-05
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Version_2.1_Preview_Change_Log#2023-06-05
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, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)


Re: JScript Panel script discussion/help

Reply #1118
I was finally able to confirm it (Why?).

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, SONY WH-ULT900N (ULT WEAR) (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #1119
I display the Cdec profile and the bitrate in JScript Panel 3 3.3.9 / Text Display (see appendix).
Unfortunately, an incorrect bit rate is always displayed when starting the file. Instead of 320 kbps it says 328 kbps (see appendix).
Only when I carry out further manipulation (stop or pause) or I edit the properties will the value be displayed correctly.

My costume text:

Code: [Select]
$font(Microsoft Sans Serif,16,700)%codec_profile% / %bitrate% kbps

Where is the error?

I hope you understand Google Translate. Sorry


Re: JScript Panel script discussion/help

Reply #1121
Small cause - big effect. A little underline...

THX for the help.

Re: JScript Panel script discussion/help

Reply #1122
Use %__bitrate%


Just curious.
What's the difference between %bitrate% (which I use myself and don't have problems with) and %__bitrate% (or $info(bitrate) ) ?

 

Re: JScript Panel script discussion/help

Reply #1123
I found another option:

Enable per-seconds updates. Then the correct bitrate comes according to the value set in Preferences/Advanced/Properties dialog/VBR bitrate updates per second.

The displayed VBR values ​​also change every second.

If it says "0" seconds, then the CBR value is correct and the VBR values ​​do not change.

Re: JScript Panel script discussion/help

Reply #1124
I found another option:

Enable per-seconds updates. Then the correct bitrate comes according to the value set in Preferences/Advanced/Properties dialog/VBR bitrate updates per second.

The displayed VBR values ​​also change every second.

If it says "0" seconds, then the CBR value is correct and the VBR values ​​do not change.

Yes, I find this a bit annoying especially with AAC radio streams altering between anything like 123 and 130kbps.