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

Re: JScript Panel

Reply #250
Just be aware the new script doesn't have top tracks/albums. It only has similar artists/charts.

And yes, the API key is included on purpose. I would have given instructions on how to use your own if I didn't!

Re: JScript Panel

Reply #251
Just be aware the new script doesn't have top tracks/albums. It only has similar artists/charts.
Actually, these are the only features that I'm using =)
And yes, the API key is included on purpose. I would have given instructions on how to use your own if I didn't!
I thought it might be so, but better safe than sorry...

Re: JScript Panel

Reply #252
marc2003
Please return, if possible :
on_tooltip_custom_paint()
thnx!

Re: JScript Panel

Reply #253
Nope, that is not coming back. Look at the extra parameters you can pass to window.CreateTooltip if you want custom font/size/style.

Re: JScript Panel

Reply #254
On_tooltip_custom_paint ()
allows  to make the hint still.
Without this function - it is impossible, moves ..

Re: JScript Panel

Reply #255
It appears in the editor because I forgot to update the "autocomplete" file at the same time I removed it. I realised this mistake back in March.

https://github.com/19379/foo-jscript-panel/commit/d45bcf5358ad4f11b8bfcabb0b146f07b14dce4b

You can save this updated file in your component folder - overwriting the existing file.

https://raw.githubusercontent.com/19379/foo-jscript-panel/master/component/interface.api

If you don't like the change, use WSH panel mod as before or even WSH panel mod PLUS.

Re: JScript Panel

Reply #256
Code: [Select]
v1.2.1
- FIX: Fix bug where the playing item handle was never sent to the
       "on_playback_edited" callback even though the docs said it would.
- FIX: Tidy up docs and auto-complete hints for "on_metadb_changed"
       and "on_selection_changed". Specifically, "on_metadb_changed" always
       receives a "handle list" and never a "handle" as the first argument.
       "on_selection_changed" never receives a "handle" argument. This behaviour
       is consistent with WSH panel mod having the "v1.4" @feature preprocessor set
       as documented here:
       https://git.io/v9cVw
       https://git.io/v9cVD

https://github.com/19379/foo-jscript-panel/releases

Re: JScript Panel

Reply #257
Check for updated components gives me, "No updates are available at this time."

It's only been a bit less than an hour since your post here. How long does it generally take before fb2k finds a new version?

Re: JScript Panel

Reply #258
If you'd visited the components site, you'd see I forgot to upload it. But it's there now!

edit: just had to re-upload the files because of a typo in changelog.  :-[

Re: JScript Panel

Reply #259
One of those days, eh? But no harm done; after all, it took me three days to notice that the last version had been uploaded. In comparison, my update today felt like getting it instantaneously.

Re: JScript Panel

Reply #260
@marc2003
On the subject of Foobar on Linux..
Been tiring to get jscript 1.2.1 to run jsplaylist-mod and Library Tree 1.3.3 both just crash.

After i run these commands I get this for both

sh winetricks gdiplus_winxp
wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message "wine: WINEARCH set to win32 but '/home/koo/.wine' is a 64-bit installation."

sh winetricks wsh57 fontsmooth=rgb msscript ie8
wine cmd.exe /c echo '%ProgramFiles%' returned empty string, error message "wine: WINEARCH set to win32 but '/home/koo/.wine' is a 64-bit installation."

---------------------------------------------------------
I have everything installed as stated above..
wine 2.7
MX-16 x64 Linux =Debian
Foobar 1.3.15 full installed with wine.(Tried my Foo portable from windows scripts crash)
architecture i386 and installed

All the standard components for foo run fine UI,NG,Albumlist and so on...

Using wine is new to me the only reason I have it installed is to run FooBar.I no interest installing anymore windows programs in wine.If foobar was native linux I would not need wine at all.I have tried most of the linux media players. Foo is God

If you can help all good if not I and live with a standard Foobar columns UI...

Thanks to You and all the Foo modder and scriptwriters out their...






Re: JScript Panel

Reply #261
Try deleting your .wine folder and running winecfg again. It looks like you may have used an existing terminal window that was already open when you edited your .bashrc file with export WINEARCH=win32

Re: JScript Panel

Reply #262
@marc2003
Thanks very much for the reply
.Will do later tonight..

Have you ever had anything to do with DeadBeef ?
If that player had and Album List & Library Tree.X
It is by far the best Linux media player.{That my opinion anyway}

Foo is God

Re: JScript Panel

Reply #263
I need two custom buttons for my foobar2000. One of them to set volume to -10db and another button to set volume to -30db.
Is it possible with this component? I'm not developer at all :(

P.S.: Didn't know where to post, so I got reply here https://hydrogenaud.io/index.php/topic,110516.new.html

Re: JScript Panel

Reply #264
Code: [Select]
v1.2.2
- ADD: Add new "on_main_menu" callback. 10 main menu items have been created
       meaning you can now bind them to global keyboard shortcuts, standard
       toolbar buttons, etc and have them run your own custom code. See
       docs\callbacks.txt

From callbacks.txt

Code: [Select]
function on_main_menu(index) {}
/*
On the main menu>File>JScript Panel, there are 10 menu items and whichever number
is selected is sent as the "index" to this callback. Being main menu items now means you
can bind them to global keyboard shortcuts, standard toolbar buttons, panel stack splitter
buttons, etc. Remember to think carefully about where you use this code as you probably only
want it to run once and so don't include it in common files and scripts where you might have
multiple instances. Also, you should avoid sharing scripts containing this code so as not
to conflict with what other users may already be using.
Example:

function on_main_menu(index) {
switch (index) {
case 1: // triggered when File>Jscript Panel>1 is run
do_something();
break;
case 2: // triggered when File>Jscript Panel>2 is run
do_something_else();
break;
}
}
*/

https://github.com/19379/foo-jscript-panel/releases

Also available on the official components site or updating through foobar itself.

Re: JScript Panel

Reply #265
@marc2003
Dear marc2003,
I just started learning to use JScript Panel, there are several questions you would like to ask about your.
1, why do I use JScript when these syntaxes will be prompted for errors: import System.Windows.Forms;
2, if I want to introduce the System command space, I need to do?
3, "// @import "%fb2k_component_path%samples\complete\js\albumart.js"",like this is the expression of the introduction of documents, but I can not find such a grammar in the official JScript document, is this is their own custom?

Thanks you.


 

Re: JScript Panel

Reply #267
@marc2003
Dear marc2003,
Thanks very much for the reply.
I get it now. Thank you.

Re: JScript Panel

Reply #268
Hi marc,
what happens to your "thumbs" script? From your latest scripts, if I copy the contents of "thumbs.txt" from 'sample' directory, it won't download and show the currently now playing artist pictures, even when I set it to auto-download and use 'download now' option. If I use "thumbs.txt" from 'sample\complete', it only shows album art or whatever image included in the folder of the currently playing track.

Thanks in advance!

Re: JScript Panel

Reply #269
Code: [Select]
v1.2.3
- ADD: Add fb.ReplaygainMode. Can be used to retrieve or set the value. See
       docs\interfaces.txt
- CHG: Hide JScript Panel main menu items. Given they're meant for binding to
       to keyboard shortcuts/standard buttons, there is no need for them to be
       visible. Hold Shift if you really want to access them from the menu.
- FIX: Fix MakeUnion handle list method and update docs with examples for
       MakeUnion, MakeDifference and MakeIntersection methods.

https://github.com/19379/foo-jscript-panel/releases

Re: JScript Panel

Reply #270
marc2003
Use it in conjunction with foo_uie_mega_panel_splitter.(MPS)
Noticed - on the latest versions, starting with 1.2 scripts are loaded with a delay (50-500ms ..)
As a consequence - I see a white screen sometimes .. And for example with version 1.1.4 - always a quick start ..

Re: JScript Panel

Reply #271
Yes, I see a flash of blank white panel when using Panel stack splitter (not using mega splitter) but it never happens with default UI or columns UI so I figured it was an issue with that component. As for script startups, mine are between 10-40ms . I can live with that and no one else has complained during the last 6 months....

Re: JScript Panel

Reply #272
marc2003
Use it in conjunction with foo_uie_mega_panel_splitter.(MPS)
Noticed - on the latest versions, starting with 1.2 scripts are loaded with a delay (50-500ms ..)
As a consequence - I see a white screen sometimes .. And for example with version 1.1.4 - always a quick start ..
What OS do you have and what is your IE browser version?

PS: I dunno about MPS, but in PSS you can avoid having white background if you draw background directly in PSS Script (i.e. PerTrack Script), because PSS panel load times are miniscule (especially when compared to complicated JScript's scripts).

Last.Fm: Library Search for Similar Artists

Reply #273
Since the Last.fm Charts API is working again, I've decided to restore the sample
Code: [Select]
v1.2.0.1
- ADD: Add Last.fm Similar Artists / Charts & Musicbrainz samples.

Thank you,

how would it be possible to have a library search when clicking on any artists in the Similar Artists window? (and for the tracks in the User Charts)

I remember there was a time (but maybe another component), we could choose between "open the last.fm artists site" *or* "list all music from the selected artist". but thats a long time ago.
I also remember, there was a little help on the github issues, but could'nt find it anymore.

Any help would be ... helpful, i guess :-)





Re: JScript Panel

Reply #274
Added for the next release.

If you really can't wait, save this inside the component folder\samples\complete\js

https://raw.githubusercontent.com/19379/foo-jscript-panel/master/foo_jscript_panel/samples/complete/js/list.js

Note: it only works in similar artists and when the charts are displaying artist only. It won't work in chart album/track mode.