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.
Recent Posts
1
MP3 - General / Re: Resurrecting/Preserving the Helix MP3 encoder
Last post by jaro1 -
New release 5.2.4 over at https://github.com/maikmerten/hmp3/releases

Most significant fixes are for the resampler, with downsampling now working again.

Maikmerten, Case.. a huge thanks again for your ideas and effort!!, last but not least thanks to John33 for storing the source, on which it is based, if i understand it correctly (i didn't study an orig. threads to Helix that precisely).
I notice, John created and uploaded GCC 14.1 compile of rel. 5.2.4 already. I would be grateful if one of the guys would be willing to prepare an actual build with the Clang compiler..
2
3rd Party Plugins - (fb2k) / Re: JScript Panel script discussion/help
Last post by Defender -
Let me explain a bit.

My AudioControl file had all code for 11 different buttons and thus had 600 lines of code. You can call this function with var b_single 0 and the panel will display all buttons. You can also choose a single button to display. In the user interface there is a setupmode in which you can either disable or enable (previously disabled) buttons. I have two full sets of separate buttons and 1 panel that shows them all (test/debug panel). The last one needs to be enabled by changing one line of PSS code, so is typically not accessible for a user.

Until now everytime I changed one tiny thing in the code I had to reload the whole thing 23x by copy/paste, changing one line per panel to say what button was to be displayed and apply.

So now I have changed the whole thing (except for the setting of two variables) to something I can include via the preprocessor.
The code that is placed in the panels itself is static (see attachment). It has the b_single variable which identifies the button I want to see and whether I want transparency (for now always 1). And now in order to be able to test this functionality also contains the on_notify_data. That's it.

I highly value the idea to have 1 set of code for all panels with only a single var defined at the top that changes functionality.

If I would want to apply what you mention before Edit 2 that means I have to include a new unique var in all of those panels and also have to keep track of which unique values I've used. That doesn't work for me.

Ad Edit 2 will work, but which one? Normally one full set of buttons and the test/debug full set are hidden. So the most obvious one would be the non-hidden menu button. I still don't like the idea of introducing an extra var to define which panel will be the publisher.

Choices for activating Reload for all panels with AudioControls available:
1) Leave it on mouse middle click; publish available on all AudioControl buttons (already tested & implemented)
2) Assigning the publish function based on on_script_unload to only one single AudioControl button (already tested & implemented)
3) Regor's method with txtfile or a timing check. Both beyond my JS3 capabilities
4) Adding an extra command to SHIFT-WinKey-Rightclick on all AudioControl buttons

For now and awaiting Marc2k3's answer on option 4 I've implemented both 1 & 2.

EDIT: Thanks for the on_script_unload tip.

Code: [Select]
// ==PREPROCESSOR==
// @name "Playback Buttons - Menu, Stop, Play/Pause, Previous, Next, PBO, RandomizeSelection, QueueSelection, ReplayGain, DSPpreset, OutputDevice - All with rightbutton extras"
// @author "marc2003, modified by Defender"
// @import "%fb2k_component_path%helpers.txt"
// @import "%fb2k_component_path%samples\js\lodash.min.js"
// @import "%fb2k_component_path%samples\js\common.js"
// @import "%fb2k_component_path%samples\js\panel.js"

// @import "%fb2k_profile_path%cui-configs\Defender\JS3\JS3_AudioControls.js"
// ==/PREPROCESSOR==

//////////////////////////////////////

var b_single = 1; // 0=Select multiple buttons Otherwise single button: 1=Menu 2=Stop 3=Play/Pause 4=Previous 5=Next 6=PBO 7=RandomizeSelection 8=QueueSelection 9=ReplayGain 10=DSPpreset 11=OutputDevice

if (b_single==0) {

// Select multiple buttons 0=OFF 1=ON. Make sure panel has enough width otherwise hover can stay activated with mouseovers

// Button Left click   Right click

b_menu = 1; // 1 Main Menu - Help Menu
b_stop = 1; // 2 Stop - Stop After Current
b_play = 1; // 3 Play/Pause - Random - PBO will not be changed
b_prev = 1; // 4 Previous - Seek Back  10 sec
b_next = 1; // 5 Next - Seek Ahead 10 sec
b_pbo = 1; // 6 PBO Dropdown - Reset to Default
b_rsel = 1; // 7 Randomize   Selection - Randomize Selection and Play
b_qsel = 1; // 8 Queue Selection - UnQueue   Selection
b_rg = 1; // 9 ReplayGain Dropdown - Reset to Track
b_dsp = 1; // 10 DSP Preset Dropdown - Reset to first found DSP preset or Preferences
b_odev = 1; // 11 OutputDevice Dropdown - Reset to second outputdevice in list (should be standard Primary Sound Driver) or Preferences
}

var transparant = 1; // 0=OFF paint background 1=ON do not paint background

/////////////////////////////////////

var publisher = 0; // Only one instance of all AudioControl panels can have publisher set to 1

function on_script_unload() {
if (publisher == 1) window.NotifyOthers('AC.RELOAD', 'Reload all other AudioControl panels');
}

function on_notify_data(name, info) {
if (name === 'AC.RELOAD') window.Reload();
}
3
General - (fb2k) / Re: How to move files by keeping folder structure?
Last post by Major_Tom -
%directoryname%\%filename%

is the simpler version for the second variant - this just creates a folder with the same name

On the other hand, if you haven't noticed yet, you can save everything as preset and reuse it whenever you want to move or copy files again...
5
General - (fb2k) / Re: How to move files by keeping folder structure?
Last post by Major_Tom -
If you want to replicate the complete folder structure on the drive:
$replace($replace(%path%,\$filename(%path%).$ext(%path%),),'Z:\',)\%filename%

If you just want to create a new folder at the new destination with the same name:
$replace($replace(%directory%,\$filename(%path%).$ext(%path%),),'Z:\',)\%filename%

Replace Z: with your drive-letter

6
3rd Party Plugins - (fb2k) / Re: JScript Panel script discussion/help
Last post by regor -
Nope. That one hangs foobar. Probably because all the panels that receive the message will reload and send their own NotifyOthers resulting in deadlock.
I ran into "similar" problem on my Playlist Manager panel, where I had to force other panels to do something, but only a single time per call (no matter which panel threw the notification).
You can manage that with an extra txt file OR setting a date.now() timestamp at the properties panel and assume that any reload within X ms/secs should be skipped for ex. Save the date before reloading.
7
General - (fb2k) / How to move files by keeping folder structure?
Last post by zpoison -
Hello, I used to do it all the time but I forgot how to do it now

In: Move > File operation setup
What is the formating pattern to enter if I want to keep the folder structure (same folder name) please?

Right now I have %filename% 
It moves the files but not the folders , I want to send the files and keep the same folder name

I tried %directoryname%
but the files are still being moved without their folders

(see pic attached)
Thank you
9
3rd Party Plugins - (fb2k) / Re: JScript Panel script discussion/help
Last post by Major_Tom -
Quote
Nope. That one hangs foobar. Probably because all the panels that receive the message will reload and send their own NotifyOthers resulting in deadlock.

If you notify the panel you changed of the changes of all other panels and force a reload of the already changed panel, this definitely will end in a deadlock. If you want to change scripts in different panels, you will have to send different notifications from each panel, e.g. "1" from panel 1, "2" from panel "2" and so on, and in the on_notify data you will have to check for all values except the one sent from the respective panel.

Edit: this will probably also end in a deadlock or take at least some time, because you will force 23 reloads of each panel. Probably not the best solution, if you would like to change different panels and notify others of the changes to force a reload - would be easy if you always change the same panel and just inform others to be redrawn

Edit2: What if you use the same panel for reloads each time? Then you just have to put the window.NotifyOthers in this panel and the others just get the On_Notify part and will be automatically reloaded.