Skip to main content

Topic: JScript Panel (Read 45498 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Since my recent WSH panel mod updates have been breaking old scripts, I've decided to start fresh with this. Because it has a different name, it can run side by side with WSH panel so you can run any combination of old/new scripts without having to update them.

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

I can only apologise for the lack of content on the wiki! I keep meaning to add more and I'll try and get around to it one day.

Some of the scripts I used to share separately are now bundled with the component.

https://github.com/19379/foo-jscript-panel/tree/master/foo_jscript_panel/samples

Also included is an updated version Falstaff's excellent JSPlaylist script. Updated versions of his JS Smooth scripts have also been added.

Update 9th January 2017: v1.2.0 and later support the Chakra javascript engine if your computer has IE9 or later installed. This allows you to use newer ECMAScript 5 features documented here:

https://msdn.microsoft.com/library/ff974378.aspx#_ecmascript

Update 4th February 2017: Now available on the official components repository.

http://www.foobar2000.org/components/view/foo_jscript_panel

Update 25th September 2017: v1.3.0 and above now requires any version of Windows with IE9 or later installed. This doesn't really change the requirements because even Vista supports it. It may affect a handful of Linux/WINE users.
  • Last Edit: 25 September, 2017, 10:48:08 AM by marc2003

  • Falstaff
  • [*][*][*][*][*]
JScript Panel
Reply #1
welcome to the new baby

I think you take the right decision, WSH Panel Mod will stay in v1.5.6 for those who want to run WSH panel mod scripts designed for, and new scripts will have to be for your new component.

my 3 jscripts in progress are now ported to JScript Panel:

- JS Smooth Playlist
- JS Smooth Browser
- JS Smooth Playlist Manager

I will share them as JScript Panel scripts only in next updates

The king is dead, long live the king!
  • Last Edit: 09 November, 2015, 11:28:32 AM by Falstaff

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #2
It's good to have you onboard. 

  • Falstaff
  • [*][*][*][*][*]
JScript Panel
Reply #3
my first "JScript Panel" scripts, now available from my DA account, so i share links here

JS Smooth Playlist Manager: http://fav.me/d9g6kss
JS Smooth Playlist: http://fav.me/d9g6kgk
JS Smooth Browser: http://fav.me/d9g6ko0


  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #4
Nice. You may want to update the requirements though. You list foobar2000 v1.1 but the component requires v1.3 or above. Also, you mention clearing WSH panel properties when updating. 
  • Last Edit: 10 November, 2015, 08:00:50 AM by marc2003

  • Falstaff
  • [*][*][*][*][*]
JScript Panel
Reply #5
fixed, thanks ...

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #6
Code: [Select]
v1.0.1
- CHG: Update default script so you know a blank panel
       is JScript Panel as opposed to WSH Panel Mod.


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



Hopefully, I removed all remaining references to WSH panel in the docs as well.
  • Last Edit: 10 November, 2015, 01:56:02 PM by marc2003

  • zeremy
  • [*][*][*][*]
JScript Panel
Reply #7
This is certainly going in the right direction.
Great decision.

You should update https://github.com/19379/foo_uie_wsh_panel_mod README.md to notify/redirect users to the JScript Panel component as I assume all updates will be made to it only.

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #8
I'll probably nuke the WSH repo in a few days. I'll put the last version and source in the uploads forum for anyone who wants it.

Rather stupidly, I didn't even put a description of this component in the first post so I've updated the wiki page here:

https://github.com/19379/foo-jscript-panel/wiki
  • Last Edit: 10 November, 2015, 10:32:46 PM by marc2003

  • MachineHead
  • [*][*][*][*][*]
JScript Panel
Reply #9
New JScript sample lastfm bio.txt used in chooser panel crashes. The other text samples I used (properties & thumbs) work fine. Error message below.

Code: [Select]
JScript Panel (Panel Receiver by marc2003): Microsoft JScript runtime error:
'this.content.length' is null or not an object
Line: 1, Col: 1
<source text only available at compile time>
  • Last Edit: 10 November, 2015, 11:10:32 PM by MachineHead

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #10
Answered in the new JScript Panel script discussion/help thread. 

I'd like to keep this thread for component updates/issues only.

  • foosion
  • [*][*][*][*][*]
  • Moderator
JScript Panel
Reply #11
I think it was a good idea to create a fork of WSH panel mod. Throwing away the git history prior to your fork? Not so much.

Git has some powerful tools to transplant changes from one branch to another. Re-starting history makes this process harder than needs to be because most of these tools require that the branches have a common ancestor. It does not affect me in this case so take this as a friendly suggestion instead of a complaint: Please preserve the continuity of your git history! Otherwise some day some people might form a lynch mob.
http://foosion.foobar2000.org/ - my components for foobar2000

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #12
One person has forked the WSH repo on github so I'm not too concerned. If they know what they're doing, they can clone the JScript Panel repo, checkout the first commit and copy those files into the WSH panel mod source folder and commit the changes.

EDIT: I just remembered github lets you download from any point in history so no need to clone/checkout the first commit. Here's the source of my very first commit to the new repo.

https://github.com/19379/foo-jscript-panel/...81db9e209a5.zip

EDIT2: Because of renamed folders, they shouldn't copy the whole zip but rather the contents of foobar2000/foo_jscript_panel/foo_jscript_panel in to foobar2000/foo_uie_wsh_panel_mod/foo_uie_wsh_panel_mod
  • Last Edit: 12 November, 2015, 01:44:08 AM by marc2003

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #13
Code: [Select]
v1.0.2

- CHG: Update to latest Columns UI SDK.
- CHG: Hopefully removed all traces of WSH Panel Mod
       from sources and documentation!


https://github.com/19379/foo-jscript-panel/releases
  • Last Edit: 12 November, 2015, 04:56:09 AM by marc2003

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #14
@foosion, because I have far too much time on my hands, I've uploaded a new repo with full history.

https://github.com/19379/foo-jscript-panel/commits/master

JScript Panel
Reply #15
Can you add a special interface for me, that interface is used to transform metadata Traditional Chinese into Simplified Chinese?  utils.LCMapString(str,lcid,flag)

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #16
If it exists in that "plus" component, I may be able to copy it. Can you give me an example of the input/output you expect so I can check it.

JScript Panel
Reply #17
If it exists in that "plus" component, I may be able to copy it. Can you give me an example of the input/output you expect so I can check it.

JSSmoothPlaylist main script.txt?Line 2743-2747?2771-2773?2821-2842
A demonstration of the operation?a.pomf.cat/rtthdj.gif   
Modified files?a.pomf.cat/ptlzst.7z  ?  a.pomf.cat/sztrpu.m4a

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #18
Code: [Select]
v1.0.3
- CHG: Revert previous Columns UI SDK update as I've just had foobar2000 crash.
       It did actually point at Panel Stack Splitter as the problematic
       component but I've never had an issue with it before. Given PSS acts
       as a container for other panels, I think it might be related. I don't
       have the skills to troubleshoot such an issue so the easiest thing to do
       is roll back.


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

  • bdport67
  • [*]
JScript Panel
Reply #19
ok switching over to JScript.
Seems there isnt an "use display preferences" selection mode on the art viewer anymore?

so I end up with same art in both Library and Now playing sides

you assisted me before with my setup with WSH panel.

https://www.hydrogenaud.io/forums/index.php...=104363&hl=

thoughts?


  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #20
As much as I don't like that option, I've decided to restore it. Save this inside js_marc2003\js

https://raw.githubusercontent.com/19379/js-...ter/js/panel.js

Further questions about scripts should go in this thread: https://www.hydrogenaud.io/forums/index.php?showtopic=110516


  • bdport67
  • [*]
JScript Panel
Reply #21
As much as I don't like that option, I've decided to restore it. Save this inside js_marc2003\js

https://raw.githubusercontent.com/19379/js-...ter/js/panel.js

Further questions about scripts should go in this thread: https://www.hydrogenaud.io/forums/index.php?showtopic=110516

perfect thanks
like a charm

addl q posted in other post

  • Falstaff
  • [*][*][*][*][*]
JScript Panel
Reply #22
bug report / WSH Panel Mod, method GetPlaylistFocusItemHandle no more available in plman :'(

bug in JSPlaylist that use this method...

JScript panel 1.0.3, earlier version not checked.
  • Last Edit: 14 November, 2015, 06:27:42 AM by Falstaff

  • marc2003
  • [*][*][*][*][*]
  • Developer
JScript Panel
Reply #23
It's my fault for not including my removal of it in the changelog. I've just updated it.

It was removed because it's identical to fb.GetFocusItem which is used much more often.

Also, I think your usage was incorrect.

Code: [Select]
var save_focus_handle = plman.GetPlaylistFocusItemHandle(p.list.playlist);


The optional argument is force which defaults to true when omitted.

Original docs:

Code: [Select]
IFbMetadbHandle GetPlaylistFocusItemHandle(force);


Original docs for GetFocusItem
Code: [Select]
    // force: if this parameter is set to false, GetFocusItem() will only look for the focus item, otherwise, 
    //   if the focus item not found, find the first item of the active playlist.
    IFbMetadbHandle GetFocusItem(force = true);


You can see here where I removed it from my own mod of JSplaylist...

https://github.com/19379/jsplaylist-mod/com...08dbcede7a16f47
  • Last Edit: 14 November, 2015, 07:18:30 AM by marc2003

  • zeremy
  • [*][*][*][*]
JScript Panel
Reply #24
If it exists in that "plus" component, I may be able to copy it. Can you give me an example of the input/output you expect so I can check it.

JSSmoothPlaylist main script.txt?Line 2743-2747?2771-2773?2821-2842
A demonstration of the operation?a.pomf.cat/rtthdj.gif   
Modified files?a.pomf.cat/ptlzst.7z  ?  a.pomf.cat/sztrpu.m4a


@marc2003
It was in the "plus" component.
Forked and commit at https://github.com/smoralis/foo-jscript-pan...a96cf9ee05f626b

I hope you don't mind me contributing, this component was dead until you picked it up , so lets all contribute to make it what we all want...

@always.beta
Tested with your samples.
You need to update though your modified JSSmoothPlaylist to a JScript component compatible version.