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

WSH Panel Mod script discussion/help

Reply #4000
Please, someone who knows?
I was read about Windows 10 , I plan to swich to it, when it comes.
Problem is that Internet Explorer doesn't exist anymore, they use Spartan browser and Cortana.
Does this will impact on scripts that use IE?

WSH Panel Mod script discussion/help

Reply #4001
a quick google found this...

http://blogs.msdn.com/b/ie/archive/2015/01...view-build.aspx

Quote
Spartan provides compatibility with the millions of existing enterprise web sites designed for Internet Explorer. To achieve this, Spartan loads the IE11 engine for legacy enterprise web sites when needed, while using the new rendering engine for modern web sites. This approach provides both a strong compatibility guarantee for legacy enterprise web sites and a forward looking interoperable web standards promise.

We recognize some enterprises have legacy web sites that use older technologies designed only for Internet Explorer, such as custom ActiveX controls and Browser Helper Objects. For these users, Internet Explorer will also be available on Windows 10. Internet Explorer will use the same dual rendering engines as Spartan, ensuring web developers can consistently target the latest web standards.


edit: looking again at how that is worded, it might only apply to enterprise versions of windows? i guess we'll see when it comes out.

WSH Panel Mod script discussion/help

Reply #4002
This is helpful.  I didn't install any new anti-virus recently, however now I'm wondering if WSH is somehow disabled on my PC.  Trying to find how to check this...


Just out of curiosity, here's a simple html clock that requires the running of a local js file Colour clock
Extract that and load the index file in your browser. If you see the current time and a background with colour that keeps changing, then the problem isn't system wide and just something within foobar, try updating it. However, if the clock doesn't load the time and just shows 00.00.00 and one background, then maybe you could try disabling your antivirus  then seeing if the clock and/or foobar loads properly. If not antivirus maybe some malware protection. I had Avast in the long ago and it gave me errors as well because it was blocking scripts, which is also likely the reason you are getting the UI hacks error too


Thanks for this.  I tried the html clock and it seems to be working.  Nevertheless I uninstalled Avast just to see if it might help.  No luck.  Short of a new installation of Windows, I'm not sure what to try next.  I'll post my foobar console once more, just in case it provides any other clues.  ("'panel' is undefined" ??)

UI Hacks: DLL-hijacking failed
UI Hacks: hooks status 0x420000
Components loaded in: 0:00.861647
Configuration read in: 0:00.049205
Watching: E:\MUSIC_LIBRARY
Error: WSH Panel Mod (Small Web Links by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Small Web Links by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 13, Col: 1
<source text only available at compile time>
Error: WSH Panel Mod (Item Details by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Item Details by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 9, Col: 1
<source text only available at compile time>
Error: WSH Panel Mod (Art Reader by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Art Reader by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 9, Col: 1
<source text only available at compile time>
Error: WSH Panel Mod (Last.fm & Wikipedia Biography by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Last.fm & Wikipedia Biography by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 13, Col: 1
<source text only available at compile time>
Error: WSH Panel Mod (Allmusic review by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Allmusic review by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 9, Col: 1
<source text only available at compile time>
Error: WSH Panel Mod (Musicbrainz by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Musicbrainz by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 9, Col: 1
<source text only available at compile time>
WSH Panel Mod ({0E242E3D-F689-4B4D-A7C2-C6DE4A711184}): initialized in 6 ms
Error: WSH Panel Mod (Last.fm Charts by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Last.fm Charts by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 7, Col: 1
<source text only available at compile time>
Error: WSH Panel Mod (News / Reviews / Blogs by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (News / Reviews / Blogs by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 9, Col: 1
<source text only available at compile time>
WSH Panel Mod ({0663E3AE-57D4-4FEE-B36F-E8DE9FB96582}): initialized in 8 ms
Error: WSH Panel Mod (Thumbs by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Thumbs by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 11, Col: 1
<source text only available at compile time>
User Interface initialized in: 0:00.165584
foo_upnp: succesfully loaded file C:\Users\Michael\AppData\Roaming\foobar2000\foo_upnp.xml
foo_upnp: initialized in 0.107s
Conf2 already initialized.
foo_upnp: created 111279 path registry entries in 3.546s
foo_logitech_lcd.dll [Error] (.\LCDWrapper.cpp, `anonymous-namespace'::APIInit, 721): LCD drivers not installed or incorrect version.
foo_logitech_lcd.dll [Error] (.\LCDWrapper.cpp, NLCD::CConnection::NewConnection, 655): Failed to initialise LCD API
foo_logitech_lcd.dll [Error] (.\LCDDisplay.cpp, CLCDDisplay::Initialise, 61): Failed to create LCD object. Plugin will be unavailable.
foo_logitech_lcd.dll [Error] (.\foobarDLL.cpp, CFoobarDLL::threadProc, 129): Could not initialise LCD. Plugin will be unavailable.
Startup time : 0:07.716657
foo_upnp: loaded Media Library tree in 22.344s
Seekbar: taking Direct2D1 path.
Seekbar: Frontend initialized.
Autobackup: Backed up 118 items to autobackup.20150316-090029.zip

WSH Panel Mod script discussion/help

Reply #4003
i'd like to see the console report with only the default WSH script please, and if possible in a new foobar2000 portable installation with ony the WSH Panel Mod component inastalled!
imho it's a better way to get new clue for your issue

EDIT: because i assume that 'panel' error is present because of common7.js can't be loaded, so 'panel' object' not declared.

WSH Panel Mod script discussion/help

Reply #4004
Quote
Error: WSH Panel Mod (Small Web Links by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load
Error: WSH Panel Mod (Small Web Links by marc2003): Microsoft JScript runtime error:
'panel' is undefined
File: <main>
Ln: 13, Col: 1
<source text only available at compile time>


this is a very different and far less serious error to what you had before. this shows that script inside the panel is actually running. you're just missing files that are required by the script. check the file path indicated above.

it really does look like avast was blocking something because these previous errors you posted shows the component not even initialising to run any script. it wouldn't have mattered what script was inside the panel. it looks like a good call from blaxima to check your AV.

Quote
Scripting Engine Initialization Failed (Thumbs by marc2003, CODE: 0x80040154): Class not registered
Scripting Engine Initialization Failed (News / Reviews / Blogs by marc2003, CODE: 0x80040154): Class not registered
Scripting Engine Initialization Failed (Last.fm Charts by marc2003, CODE: 0x80040154): Class not registered


EDIT: because i assume that 'panel' error is present because of common7.js can't be loaded, so 'panel' object' not declared.


indeed. the first line of code in every single script of mine begins...

Code: [Select]
var p = new panel("something"....


it should be an easy fix now.

WSH Panel Mod script discussion/help

Reply #4005
Thanks for this.  I tried the html clock and it seems to be working.  Nevertheless I uninstalled Avast just to see if it might help.  No luck.  Short of a new installation of Windows, I'm not sure what to try next.  I'll post my foobar console once more, just in case it provides any other clues.  ("'panel' is undefined" ??)

UI Hacks: DLL-hijacking failed
UI Hacks: hooks status 0x420000
Components loaded in: 0:00.861647
Configuration read in: 0:00.049205
foo_logitech_lcd.dll [Error] (.\LCDWrapper.cpp, `anonymous-namespace'::APIInit, 721): LCD drivers not installed or incorrect version.
foo_logitech_lcd.dll [Error] (.\LCDWrapper.cpp, NLCD::CConnection::NewConnection, 655): Failed to initialise LCD API
foo_logitech_lcd.dll [Error] (.\LCDDisplay.cpp, CLCDDisplay::Initialise, 61): Failed to create LCD object. Plugin will be unavailable.
foo_logitech_lcd.dll [Error] (.\foobarDLL.cpp, CFoobarDLL::threadProc, 129): Could not initialise LCD. Plugin will be unavailable.



Did you reboot after uninstalling? Avast needs to be released from memory.

Marc's scripts are loading but the common7.js file is the problem because of one of two things, it's not being found or protective software(Avast, Windows Defender, User Account Control, etc.) blocking it from being loaded. Those dll errors still has me thinking it's the latter because it says that the configuration and components folder are being found (hopefully with the required components in there).

WSH Panel Mod script discussion/help

Reply #4006
Quote
Error: WSH Panel Mod (Small Web Links by marc2003): Parsing file "C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\common7.js": Failed to load

this is a very different and far less serious error to what you had before. this shows that script inside the panel is actually running. you're just missing files that are required by the script. check the file path indicated above.



Well, I just checked the path, and the only file in C:\Users\Michael\AppData\Roaming\foobar2000\marc2003\ is "common8.js".

I have no idea how it got renamed.  I just tried changing the file name to common7.js and started foobar, and at least one of the WSH panels then works.  However most still don't.  I've switched it back to common8.js for the moment.  I wonder if I had tried to update something incorrectly?  What's best at this point?  Freshly installing the scripts?

WSH Panel Mod script discussion/help

Reply #4007
just make sure the marc2003 folder and the scripts that go inside each panel come from the same major version. common7 and 8 are both valid versions but they are not compatible with each other - that's why renaming did not work. they even run side by side but only when the required dependency files are in place.

if you use files from the same zip download, you won't have a problem.

WSH Panel Mod script discussion/help

Reply #4008
The similar artist script is no longer working but it is creating an artist.getSimilar.json file with this inside of it

Code: [Select]
{"error":26,"message":"Suspended API key - Access for your account has been suspended, please contact Last.fm","links":[]}


WSH Panel Mod script discussion/help

Reply #4009
The similar artist script is no longer working but it is creating an artist.getSimilar.json file with this inside of it

Code: [Select]
{"error":26,"message":"Suspended API key - Access for your account has been suspended, please contact Last.fm","links":[]}


you have to create your own API key, see the last.fm sync thread for a manual

WSH Panel Mod script discussion/help

Reply #4010
The similar artist script is no longer working but it is creating an artist.getSimilar.json file with this inside of it

Code: [Select]
{"error":26,"message":"Suspended API key - Access for your account has been suspended, please contact Last.fm","links":[]}


you have to create your own API key, see the last.fm sync thread for a manual


thanks

WSH Panel Mod script discussion/help

Reply #4011
To anyone else struggling with the CODE: 0x80020101 ERROR - first make sure you have unselected "safe mode" in the WSH panel preferences before you start posting here trying to get help.

That was the problem for me. (Facepalm)

Somehow this setting got lost in the Win10 upgrade I made recently (that, although I copied the Foobar AppData folder in its entirety).

WSH Panel Mod script discussion/help

Reply #4012
just make sure the marc2003 folder and the scripts that go inside each panel come from the same major version. common7 and 8 are both valid versions but they are not compatible with each other - that's why renaming did not work. they even run side by side but only when the required dependency files are in place.

if you use files from the same zip download, you won't have a problem.



Just wanted to say thanks for all the help... Somehow I've got it working again.  I did a new portable installation with fresh scripts and everything, and it seems to be working fine now.

WSH Panel Mod script discussion/help

Reply #4013
Please, someone who knows?
I was read about Windows 10 , I plan to swich to it, when it comes.
Problem is that Internet Explorer doesn't exist anymore, they use Spartan browser and Cortana.
Does this will impact on scripts that use IE?


On the newest build released today (10041) I am having constant problems with wsh_panel_mod crashing. Nothing has changed in regards to my foobar installation, as it resides on a network share. When running foobar from other machines on the network with older versions of the windows operating system (including the the January 9926 build) there are no issues. So just from my own personal experience so far it does seem like there is definitely an issue. The crashes happen regardless of if i select jscript or jscript9 as the script engine. Usually I'm just getting the "Aw, Crashed " messaged in wsh_panel itself, and re-applying the script configuration will bring the panel content back. Though on a few occasions today wsh_panel_mod has crashed the entire foobar2000 program. Next time it brings the program crashing down i will try and post more details.

Edit: I should probably note that the crashes seem to be happening only with marc2003's scripts, as I have not yet seen an "Aw, crashed" message in the panel hosting jsplaylist. Which is not to say there's a problem with these excellent scripts, I'm pretty sure this is entirely related to the new windows build as I have never had an issue in years of running these scripts until today.

WSH Panel Mod script discussion/help

Reply #4014
Please, someone who knows?
I was read about Windows 10 , I plan to swich to it, when it comes.
Problem is that Internet Explorer doesn't exist anymore, they use Spartan browser and Cortana.
Does this will impact on scripts that use IE?


On the newest build released today (10041) I am having constant problems with wsh_panel_mod crashing. Nothing has changed in regards to my foobar installation, as it resides on a network share. When running foobar from other machines on the network with older versions of the windows operating system (including the the January 9926 build) there are no issues. So just from my own personal experience so far it does seem like there is definitely an issue. The crashes happen regardless of if i select jscript or jscript9 as the script engine. Usually I'm just getting the "Aw, Crashed " messaged in wsh_panel itself, and re-applying the script configuration will bring the panel content back. Though on a few occasions today wsh_panel_mod has crashed the entire foobar2000 program. Next time it brings the program crashing down i will try and post more details.

Edit: I should probably note that the crashes seem to be happening only with marc2003's scripts, as I have not yet seen an "Aw, crashed" message in the panel hosting jsplaylist. Which is not to say there's a problem with these excellent scripts, I'm pretty sure this is entirely related to the new windows build as I have never had an issue in years of running these scripts until today.


What build do you mean? Windows 10?

WSH Panel Mod script discussion/help

Reply #4015
What build do you mean? Windows 10?


Do you know of another Windows build released today? Also, I included in my response the quote asking about issues related to Windows 10. So to answer your question... Yes, Windows 10. Sorry if that wasn't clear.

I believe this build (10041) is the first to implement the new rendering engine that will be featured in the forthcoming Spartan browser.

WSH Panel Mod script discussion/help

Reply #4016
well i am genuinely curious about this so try this in a fresh panel...

Code: [Select]
function on_mouse_lbtn_dblclk() {
    var arr = ["Microsoft.XMLHTTP", "htmlfile", "Shell.Application", "WScript.Shell", "Scripting.FileSystemObject", "ScriptControl", "dummy"];
    var objs = {};
    var text = "";
    for (i in arr) {
        try {
            objs[arr[i]] = new ActiveXObject(arr[i]);
            text += arr[i] + " seemed to load ok.\n";
        } catch(e) {
            text += arr[i] + " ain't working.\n";
        }
    }
    fb.ShowPopupMessage(text);
}


double click the panel and you should get a popup window displaying something like this...

Code: [Select]
Microsoft.XMLHTTP seemed to load ok.
htmlfile seemed to load ok.
Shell.Application seemed to load ok.
WScript.Shell seemed to load ok.
Scripting.FileSystemObject seemed to load ok.
ScriptControl seemed to load ok.
dummy ain't working.


i added dummy just to show how this script works when trying to load something that is invalid.

WSH Panel Mod script discussion/help

Reply #4017
a quick google found this...

http://blogs.msdn.com/b/ie/archive/2015/01...view-build.aspx

Quote
Spartan provides compatibility with the millions of existing enterprise web sites designed for Internet Explorer. To achieve this, Spartan loads the IE11 engine for legacy enterprise web sites when needed, while using the new rendering engine for modern web sites. This approach provides both a strong compatibility guarantee for legacy enterprise web sites and a forward looking interoperable web standards promise.

We recognize some enterprises have legacy web sites that use older technologies designed only for Internet Explorer, such as custom ActiveX controls and Browser Helper Objects. For these users, Internet Explorer will also be available on Windows 10. Internet Explorer will use the same dual rendering engines as Spartan, ensuring web developers can consistently target the latest web standards.


edit: looking again at how that is worded, it might only apply to enterprise versions of windows? i guess we'll see when it comes out.


Thanks, i tried windows 10 preview, there's problem with some scripts that use html.
Spatan browser still doesn't exist.
Beside this, windows 10 is awesome

WSH Panel Mod script discussion/help

Reply #4018
did you try that code snippet in my post above yours. does htmlfile fail to load?

WSH Panel Mod script discussion/help

Reply #4019
did you try that code snippet in my post above yours. does htmlfile fail to load?

I was inastall windows 10 on second partition, but i want to install on second hard disk..
When i do this , i will post later ..
Maybe this is some err in my script..
YT radio works fine, biography photos works fine, err appears in ''bio text'', in ''href tag''..

Marc i have this script:

Code: [Select]
                fso = new ActiveXObject("Scripting.FileSystemObject");
                folder = fb.ProfilePath + "Temp";
                filename = folder + "\\"+ artist + " - " + title + ".m3u";

                              if (fso.FolderExists(folder))  .....

I can locate specific file in folder: (''filename = folder + "\\"+ artist + " - " + title + ".m3u";'')
But how do i list all files in that folder, with extension ''.m3u''?

I need this , to be able to play loved tracks, which is located in that folder.

WSH Panel Mod script discussion/help

Reply #4020
there's no point trying that script. it was only after i posted that i checked and saw that JSplaylist uses the htmlfile ActiveXObject. strangeluck already indicated JSplaylist works fine on that new windows 10 build.

also, i forgot you had your own internet scraping scripts so it's pointless testing for the stuff i use when you could be using something else different.

as for your m3u question, look at utils.glob in the docs.

WSH Panel Mod script discussion/help

Reply #4021
there's no point trying that script. it was only after i posted that i checked and saw that JSplaylist uses the htmlfile ActiveXObject. strangeluck already indicated JSplaylist works fine on that new windows 10 build.

also, i forgot you had your own internet scraping scripts so it's pointless testing for the stuff i use when you could be using something else different.

as for your m3u question, look at utils.glob in the docs.


Thanks, this works:
Code: [Select]
 var arr = utils.Glob(folder + "\\*.*").toArray();

Problem is that foobar wont read ''*.m3u'' file that i made

WSH Panel Mod script discussion/help

Reply #4022
big assumption here but if you used the p.save function in my common file to create your m3u files, that would explain why it doesn't work.

WSH Panel Mod script discussion/help

Reply #4023
big assumption here but if you used the p.save function in my common file to create your m3u files, that would explain why it doesn't work.

This is what i'm use:

Code: [Select]
           case 50:
                p.path = p.eval("%path%");
                p.artist = p.eval("%artist%");
                p.title = p.eval("%title%");
               
                fso = new ActiveXObject("Scripting.FileSystemObject");
                folder = fb.ProfilePath + "YT";
                filename = folder + "\\"+ p.artist + " - " + p.title + ".m3u";
                if(!fso.FolderExists(folder)) fso.CreateFolder(folder);

                function save_file(x) {
                try {
                g_text = p.path;
                ts = fso.OpenTextFile(filename, 2, true, -1);
                ts.Write(g_text);
                ts.close();
                } catch(e) {
                fb.trace("Error saving text: " + e);
                }
                  }

                save_file(filename);
break;

(if i enter same text manualy in file, it works..)

EDIT:

Ok, i fix problem with this line:
(now works fine).

Code: [Select]
ts = fso.OpenTextFile(filename, 2, true, -2);

WSH Panel Mod script discussion/help

Reply #4024
Code: [Select]
fso.OpenTextFile(filename, 2, true, -1);


you probably looked at that and didn't understand what the numbers were for.... so you googled it and found out. that had to be more satisfying than me telling you even if i did you give quite a large clue.

since strangeluck hasn't come back with any meaningful bug reports about scripts crashing in the latest build of windows 10, i've knocked up a little script which does some more in depth testing. first it tests the clipboard because i think that's all falstaff uses it for in JSplaylist. i then test some html stuff. since i'm on windows 7, this is what my popup window reports...

Code: [Select]
creating the htmlfile ActiveXObject works.
clipboardData.setData() works.
clipboardData.getData() works.
open() works.
createElement() works.
innerHTML and innerText works.
getElementsByTagName works.
className works.
close() works.
testing complete. everything seems ok.


it's just a blank white panel and you double click to run...

https://gist.github.com/marc2k3/b3d7b5da40af202738ad