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: Spider Monkey Panel (foo_spider_monkey_panel) (Read 342079 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1100
Hello,

does anyone know how to fix the ActiveX htmlfile error?:

ActiveXObject_Constructor failed:
Failed to create ActiveXObject object via CLSID: htmlfile
const doc = new ActiveXObject('htmlfile');

Is there a fix or workaround?
I am using the latest Spider Monkey Panel v1.4.1 with foobar 1.6.5...

Thank you

- TT

You need to install the Gecko support in Wine to have basic HTML controls, and even then, it's not guaranteed to be compatible with Windows.

For anyone else that has the same problem running foobar in Wine, installing Gecko solved the problem.
Unfortunately that didn't work for me using WilB's Biography. But.. I'm using the snap foobar package, I'm not sure how much of a difference that makes.
## foobar 1.6.8 snap, wine 6.16(?),  spider monkey 1.5.2

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1101
Hi,

Does someone knows a trick to trigger a new evaluation of panel stack splitter scripts, from a SMP panel ?
There is the play/pause way, using the function below, because the PerTrack scripts of a PSS panel are evaluate on playback changes, but this creates some sound glitches, especially while playing live streams (because foobar can't buffer the stream when this is a live stream, it need to synchronize with the stream after a pause command)

Code: [Select]
function RefreshPSS() {
if (fb.IsPlaying || fb.IsPaused) {
fb.PlayOrPause();
fb.PlayOrPause();
}
else {
fb.Play();fb.Stop();
}
}

There is a trick you can try.

You will need to enable is the PSS panels "Evaluate scripts when track info is modified"

Change your function to
Code: [Select]

function RefreshPSS() {
let handle_list = plman.GetPlaylistItems(plman.ActivePlaylist);
handle_list.RefreshStats();
}

There is a limitation:  Your handle list cannot be empty.

Ah yes, thanks! By combining both methods, you end up with something which work all the time:
Code: [Select]
function RefreshPSS() {
if (fb.IsPlaying || fb.IsPaused) {
let handle_list = new FbMetadbHandleList(fb.GetNowPlaying());
handle_list.RefreshStats();
}
else {
fb.Play();fb.Stop();
}
}

Important point:
 "Evaluate scripts when track info is modified" needs to be enabled AND on the script tab of the PSS panel, "Titleformat mode on startup" needs to be on "now playing"

Replying to an older post from Page 8. I have the exact same issue and it's exactly what I need for a theme I'm using, which I haven't yet converted to SMP. (It's currently jscript)

I was wondering if these two lines be converted to jscript...

let handle_list = new FbMetadbHandleList(fb.GetNowPlaying());
handle_list.RefreshStats();

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1102
Never mind, I figured it out. :)

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1103
SMP Sample rating.js crashes when adding location
(fb2k profile path\user-components\foo_spider_monkey_panel\samples\complete\rating.js)

The first one or two are fine, but adding more locations causes crashes.

List of location
http://radio.linn.co.uk:8003/autodj
https://q2stream.wqxr.org/q2
http://stream.radioparadise.com/flac


So I have tested after clean install.(portable installation v1.6.8 stable)
I installed 2 components.

Column UI 1.7.0-beta.2
SMP 1.5.2

Reload command of right button menu doesn't work.
But after playing the stream, the error window does not appear.


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1105
It's a known bug with the component. I've submitted a fix on github but it could be some time before the next version is released.

Thanks for answer. I'll be waiting for the next version.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1106
yea, work was a being too stressful lately, so had zero capacity for any of my pet projects.
will probably return to (semi-)active development by the end of December/January


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1108
Hello, I just installed this component today and I'd love to check out some of the user scripts, as described here:
https://theqwertiest.github.io/foo_spider_monkey_panel/docs/script_showcase/single_panel_scripts/#built-in-scripts

I am unable to find the "Open Configure Panel... dialog." option
Nevermind, I figured it out. I had to add the spidermonkey layout panel.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1109
How to force execution window.Width and window.Height at the start of the script.
UR5EQF. Ukraine

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1110
Hello @TheQwertiest , I am trying to upgrade (inport) Biography JS v1.2.0 over the older 1.1.3 but I cannot do that because FB crashes at each attempt.
I also tried to remove and reinstall SMP (v1.6.0), but once reinstalled that old JS is automatically re-loaded and I have again the same problem.
How can I completely reset my SMP / FP installation? Or how can I simply force a single SMP panel to reset?
Regards, Andrea

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1111
You should not use SMP v1.6 as it has known issues. Use v1.52 - https://github.com/TheQwertiest/foo_spider_monkey_panel/releases/tag/v1.5.2

If you still have issues then remove the component. Do it manually via explorer if you can't start fb2k (profile\user-components). Now when you start fb2k, you should have a blank space where the previous instance was. Click the blank space and add any other element. This will clear the previous instance data that was there. Now you should install v1.5.2 and replace a new panel as you normally do.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1112
Hello @marc2k3 and @TheQwertiest , I downgraded to SMP 1.5.2 and FB 1.6.9 doesn't crash anymore.
And finaly I could install the new version of the JS.
Thank you so much.
Regards, Andrea

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1113
For example, I made a simple script. Sometimes I get an error.
Code: [Select]
const objShellApp = new ActiveXObject("Shell.Application");

function get_folder() {
    var prompt = "\nSelect folder ...";   
    var folder = objShellApp.BrowseForFolder(0, prompt, 512, 17);
    if (folder != null) {
        /// do ...
    }
}

MF_ENABLED = 0x00000000;
MF_SEPARATOR = 0x00000800;

function on_mouse_rbtn_up(x, y){
    const _menu = window.CreatePopupMenu();
    _menu.AppendMenuItem( MF_ENABLED, 100, "Getfolder");
    _menu.AppendMenuItem( MF_SEPARATOR, 0, 0);
    _menu.AppendMenuItem( MF_ENABLED, 230, "Edit Script");

    ret = _menu.TrackPopupMenu(x, y);
   
    switch (ret) {
    case 100:
        get_folder();
        break;
    case 230:
        window.EditScript();  
        break; 
    }
    return true;  
}

This also happens with:
utils.InputBox();
WshShell.Popup();
Select a menu item and wait.
Sometimes the error occurs immediately.
No matter how I try, I can't reproduce the issue. Maybe it is OS dependent. What OS are you using?

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1114
Quote
No matter how I try, I can't reproduce the issue. Maybe it is OS dependent. What OS are you using?
@TheQwertiest
The problem is gone with the version 1.5.2.
Thanks
UR5EQF. Ukraine

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1115
Version: 1.6.1
Link: https://github.com/TheQwertiest/foo_spider_monkey_panel/releases/tag/v1.6.1
Changelog:
Hotfix for v1.6.0 (see changelog above)
    Changed
    • API changes:
      • Reverted changes in `window.NotifyOthers()` behaviour. Now it's executed synchronously as before.
    Fixed
    • Fixed various bugs in the event handling system, which were causing unexpected behaviour and crashes.
    • Fixed right-mouse-btn-down and middle-mouse-btn-down events not being processed.


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1117
yea >_<
it will be included in the next hotfix anyway (and I'm sure there *will* be a next hotfix :D)


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1119
To whoever posts about component dev builds on https://foobar2000.xrea.jp/ : there is no real point in posting info about builds from branches other than `master`, since all `dev build` links always point to the `master`. I.e. users won't be able to easily reach builds from other branches anyway (e.g. builds from PR branches).

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1120
^What you say is the desirable behaviour but it doesn't seem to be the case. I just followed the dev build link in the first post of this thread and installed it. It has the same commit hash as the latest build from another contributors feature branch...


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1121
@marc2k3 thanks for the heads-up!
I was sure that I've fixed all urls a long time ago, guess I missed some...

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1122
Is this behavior intended?

Pressing R. Click -> NOTHING -> and moving without releasing it -> on_mouse_move -> releasing R. Click -> NOTHING

I was expecting:

Pressing R. Click -> on_mouse_rbtn_down ->  and moving without releasing it -> on_mouse_move -> releasing R. Click -> on_mouse_rbtn_up

PD: last release, win 7, foo 1.6.2


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #1124
Nope. Tried this on a blank panel:
Code: [Select]
function on_mouse_rbtn_down(x, y, mask) {
console.log('down');
}

function on_mouse_move(x, y, mask) {
    const MK_RBUTTON  = 0x0002;
    if (mask === MK_RBUTTON) { console.log('move');}
}

function on_mouse_rbtn_up(x, y, mask) {
console.log('release');
return true;
}

Spoiler (click to show/hide)
Down and up don't fire when holding the r. click and moving.

Edit: double checked to be sure and it's the 1.6.1 release (no dev).