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

WSH Panel Mod

Reply #1600
it's an easy decision to make. i'm simply not going to post here any more. the modified component will remain online for those capable of using it.

WSH Panel Mod

Reply #1601
it's an easy decision to make. i'm simply not going to post here any more. the modified component will remain online for those capable of using it.


just calm down...
I can understanding your feelings, just behave like sage and neglect those posts that make you feel impatient.
(or just blame Wang T.P, this guy even does not develop windows apps any more and was defected to MAC OS...  )
A rose will bloom, it then will fade.

WSH Panel Mod

Reply #1602
I am sorry to read you are choosing such a drastic option. I merely wanted you to cut down on the abusive language. If you do not like dealing with end users maybe you could team up with someone.

WSH Panel Mod

Reply #1603
i should have been banned after my last foul mouthed outburst in the script thread. i can't guarantee it won't happen again which is why i'm no longer going to post.

me not posting will make very little difference. no one ever reads what i have to say which of course is the source of all my frustration.

WSH Panel Mod

Reply #1604
me not posting will make very little difference. no one ever reads what i have to say which of course is the source of all my frustration.


That is not true. I personally read your posts, and find them very informative and to the point for the user that wants to be objective and respect your efforts.
Anyone who wants to abuse your offers for help , just ignore them.
If they cannot understand that's there problem.
You have repeatedly said to users to fix there own scripts, or request the fixes from the authors of the scripts.
You even made a page in your wiki (which I know you hate doing) pointing them in the right direction. 


ps. I don't  agree with your abusing language, it's something that is of no value in this forum.

WSH Panel Mod

Reply #1605
@marc2003:

do like me, ... ignore stupid questions, especially when they were already answered many times, that concern only a few public that is maybe not at the good place or that shouldn't try to use tools they are not able to configure by themselves, but it's their fault, not your, so don't private knowledge people that apreciate your work and all your comments, often right pointed

WSH Panel Mod

Reply #1606
@everyone

For your information, the foo_uie_wsh_panel_mod wiki pages have been removed from github.
Of course, this includes the page: //github.com/marc2k3/foo_uie_wsh_panel_mod/wiki/Replacements-for-obsolete-functions

The license file (License.txt) for WSH Panel Mod contains two words: "Public Domain".
I don't see the removal of the wiki pages as a mature action in the spirit of that license, but then again what do I know, I'm one of those members who asks "ignorant stupid questions". In my world there are no ignorant stupid questions; everybody here is worthy of respect; everybody has a different way of learning something.

With regards to repeating answers in a different way, I think the benefits of publishing solutions far outweigh judgement of the value of a question.
I like altruism; if you've got five minutes of your life to spare and a fanatical love for javascript programming, then give to the needy and the ignorant, give with love, give it all and more, let them have more than they ever expected -- and forget about you and your "judgement". If you don't have five minutes of altruistic inspiration then that's fine too; there is never a need to sink your judgemental boot into someones head publically, that's for sure.

That's my philosophy.
I love everybody, including marc2003, he is a legend of this forum and I have no hard feelings towards him; he has helped me fantastically over the years and I'll never forget that.
Thanks for reading ladies and gentlemen, you all have a nice day ++++++

WSH Panel Mod

Reply #1607
The license file (License.txt) for WSH Panel Mod contains two words: "Public Domain".
I don't see the removal of the wiki pages as a mature action in the spirit of that license


anyone with at least half a brain knows the "license" applies to the code only. i put the wiki up as a gesture of goodwill but you just threw back in my face.

Quote
everybody here is worthy of respect


obviously not me. i politely told you to not to use the component if you didn't know how to update YOUR scripts. it was a simple request but you ignored it time and time again until i lost my temper.

i actually thought i gave more than enough to this community without expecting anything in return but i was clearly wrong.



WSH Panel Mod

Reply #1608
marc
I am willing to spend an inordinate amount of trial and error on getting scripts to work. I WAS going to use your wiki example as a reference.
With regards to the code block I asked you to have quick look at, I was just curious to see what the output would like from your expert hands; I thought it would only take a minute of your time...

...that is all it was mate, no big deal from my end. Please don't stop being yourself because of my scatterbrained posting style; just carry on as usual - if you want to blow your top again that's fine with me; I'm not going to pass judgement on you - If you feel like occasionally throwing a crumb of knowledge to the blockheads such as me, that would be appreciated too.

Cheers.

WSH Panel Mod

Reply #1609
I thought it would only take a minute of your time...


thank you for reinforcing my previous point. whatever i give just isn't enough. but you know it's not a matter of time. of course it would have been far easier to fix everyone's scripts rather than type up numerous wiki pages. my refusal is purely out of principal. if you can't fix your scripts given the existing docs and numerous examples that have been around for years, what possible hope do you have of using any of the new features i've provided.

i've removed my github account so the component is now in the upload forum...

http://www.hydrogenaud.io/forums/index.php?showtopic=108811

WSH Panel Mod

Reply #1610
me not posting will make very little difference. no one ever reads what i have to say which of course is the source of all my frustration.


That is not true. I personally read your posts, and find them very informative and to the point for the user that wants to be objective and respect your efforts.
Anyone who wants to abuse your offers for help , just ignore them.


I agree. I personally read every Marc post...

WSH Panel Mod

Reply #1611
Is there any way to catch the current peak of the playing file every second with Javascript directly to use in WSH Panel mod?

I tried some wsh scripts that use foo_vis_vumeter, but cpu usage jumps up to 50% on my system with vu meter/wsh panel mod...

WSH Panel Mod

Reply #1612
i don't think so. i think those scripts hook into some DLL.

WSH Panel Mod

Reply #1613
Hi,

I've got an issue with on_mouse_wheel using a trackpad, with two fingers : the "step" variable is always set to zero, no matters if you move your fingers down or up. So i can't scroll in my wsh panels
Did you experienced a similar issue with your laptop trackpad, and did you found a fix ?

WSH Panel Mod

Reply #1614
Hi,

I've got an issue with on_mouse_wheel using a trackpad, with two fingers : the "step" variable is always set to zero, no matters if you move your fingers down or up. So i can't scroll in my wsh panels
Did you experienced a similar issue with your laptop trackpad, and did you found a fix ?


always a driver issue (mouse_wheel issue already experienced with some microsoft mouse, i'd to install the "true" driver of the mouse to fix this WSH issue)
so i just can tell you to be sure you have the latest official driver for your trackpad...

WSH Panel Mod

Reply #1615
I downloaded and installed the driver for this trackpad 2 days ago, and the two finger gesture is working fine everywhere (in foobar and others applications), except on wsh panels.
So it may still be because of a driver weirdness if i'm the only one who experience this issue, but in this case, i can't do anything about it.

WSH Panel Mod

Reply #1616
if your mouse wheel function already contains code to scroll your content, you could call it with some keyboard shortcuts.

Code: [Select]
var VK_UP = 0x26; //up cursor
var VK_DOWN = 0x28; //down cursor

function on_key_down(k) {
    if (k == VK_UP)
        on_mouse_wheel(1);
    else if (k == VK_DOWN)
        on_mouse_wheel(-1);
}


edit: here's left and right as well

Code: [Select]
var VK_LEFT = 0x25;
var VK_RIGHT = 0x27;


edit2: in case anyone reading this is using my latest scripts, most have keyboard cursor shortcuts. i completely forgot to mention that when i uploaded them.

album art/thumbs accept up/down/left/right for cycling through images
all the text/list based scripts accept up/down cursor for scrolling through content

WSH Panel Mod

Reply #1617
if your mouse wheel function already contains code to scroll your content, you could call it with some keyboard shortcuts.

Code: [Select]
var VK_UP = 0x26; //up cursor
var VK_DOWN = 0x28; //down cursor

function on_key_down(k) {
    if (k == VK_UP)
        on_mouse_wheel(1);
    else if (k == VK_DOWN)
        on_mouse_wheel(-1);
}


edit: here's left and right as well

Code: [Select]
var VK_LEFT = 0x25;
var VK_RIGHT = 0x27;


edit2: in case anyone reading this is using my latest scripts, most have keyboard cursor shortcuts. i completely forgot to mention that when i uploaded them.

album art/thumbs accept up/down/left/right for cycling through images
all the text/list based scripts accept up/down cursor for scrolling through content


Yep, it could be a solution temporary.
I currently trying to learn how to compile the wsh component with visual studio, so if i manage to do that and don't give up before, i should be able to understand what's wrong hopefully.

(If yo know a link which explain quickly how to do that, it would helpful : )

WSH Panel Mod

Reply #1618
you could download the source code for my modded version which compiles as-is. i've cleaned up the paths so they're relative, updated the columns UI SDK etc...

https://github.com/19379/foo_uie_wsh_panel_...ive/v1.5.10.zip

just extract and open foobar2000\foo_uie_wsh_panel_mod\foo_uie_wsh_panel_mod.sln.

edit: if you want a "clean" version without my mods then download this...

https://github.com/19379/foo_uie_wsh_panel_...6213b8879af.zip

then save these 3 files into the foobar2000\columns_ui-sdk folder...

https://github.com/19379/foo_uie_wsh_panel_...dk/columns_ui.h
https://github.com/19379/foo_uie_wsh_panel_...-sdk/splitter.h
https://github.com/19379/foo_uie_wsh_panel_...ui-sdk/window.h

WSH Panel Mod

Reply #1619
you could download the source code for my modded version which compiles as-is. i've cleaned up the paths so they're relative, updated the columns UI SDK etc...


Whatever i tried (with your modded version or not), i didn't managed to compile it using VS2015, i can't even compile the foo_sample projet from the foobar sdk, which is supposed to be compatible with VS2015, so i gave up,  this little bug is not worth so much headaches : )

WSH Panel Mod

Reply #1620
I didn't manage to compile the component, but at least i know quite well why there is an error now :
Code: [Select]
void wsh_panel_window::on_mouse_wheel(WPARAM wp)
{
    TRACK_FUNCTION();

    VARIANTARG args[1];

    args[0].vt = VT_I4;
    args[0].lVal = GET_WHEEL_DELTA_WPARAM(wp) / WHEEL_DELTA;
    script_invoke_v(CallbackIds::on_mouse_wheel, args, _countof(args));
}


The function argument wp is typed as a WPARAM (so an unsigned int pointer), but on some trackpad, the driver send small ints, between -WHEEL_DELTA and WHEEL_DELTA to GET_WHEEL_DELTA_WPARAM(wp), in order to achieve a smooth scroll i guess.
So if you divide by WHEEL_DELTA, and cast it to an int, you've got 0, whenever you scroll up or down.

So the solution would be something like changing
Code: [Select]
on_mouse_wheel(WPARAM wp)

to
Code: [Select]
on_mouse_wheel(float *wp)

in wsh_panel_window.h and wsh_panel_window.cpp
(i don't know c++ so it may not be valid, but it's probably not far  )

WSH Panel Mod

Reply #1621
the last time i compiled, i used VS 2013 community edition update 4 and it really did work as-is. i'm surprised you couldn't make it work. i doubt VS 2015 makes any difference???

unfortunately, i don't have my own computer any more so i can't install VS to test your change.

WSH Panel Mod

Reply #1622
(i don't know c++ so it may not be valid, but it's probably not far  )
This would be a really bad idea. You need to keep the value as a WPARAM for GET_WHEEL_DELTA_WPARAM(wp), not a float or even a pointer to float. You can however use a floating point division to allow smooth scrolling. E.g. (untested):
Code: [Select]
args[0].vt = VT_R8;
args[0].dblVal = (double) GET_WHEEL_DELTA_WPARAM(wp) / (double) WHEEL_DELTA;

However this means all scripts will have to be able to handle non-integer deltas.

See also the remarks section for WM_MOUSEWHEEL, particularly this:
Quote
The wheel rotation will be a multiple of WHEEL_DELTA, which is set at 120. This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.

The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels (a freely-rotating wheel with no notches) to send more messages per rotation, but with a smaller value in each message. To use this feature, you can either add the incoming delta values until WHEEL_DELTA is reached (so for a delta-rotation you get the same response), or scroll partial lines in response to the more frequent messages. You can also choose your scroll granularity and accumulate deltas until it is reached.

My recommendation would be to introduce an accumulator. The fractional delta can be passed to the on_mouse_wheel script function as an additional parameter to preserve backwards compatibility.

WSH Panel Mod

Reply #1623
@foosion, since we have a proper programmer here, i have a question about this....

Code: [Select]
STDMETHODIMP FbMetadbHandle::get_FileSize(LONGLONG* p)
{
    TRACK_FUNCTION();

    if (m_handle.is_empty()) return E_POINTER;
    if (!p) return E_POINTER;

    *p = m_handle->get_filesize();
    return S_OK;
}


in a panel i can do something like this...

Code: [Select]
var metadb = fb.GetFocusItem();
var filesize = metadb.FileSize;


the trouble is, filesize is not a number in javascript.

Code: [Select]
fb.trace(filesize); //8430688 seems ok
fb.trace(filesize + filesize); //8430688 !!
fb.trace(filesize * 2); //throws error 'filesize' is not a number
fb.trace(typeof filesize); //unknown


could that function be changed so it returns something usable? this is curiosity more than anything. if i really want the filesize, i can get it via other means such as title formatting or using filesystemobject.

@colagen, i just realised my instructions for compiling a "clean" version were incomplete. there were more changed files i forgot to include. that still doesn't explain why you couldn't compile my modded version though.

WSH Panel Mod

Reply #1624
LONGLONG is a 64 bit integer. I do not know how to pass this to the scripting engine so that the scripting engine will treat this as a number. As a workaround you could change the result type of the function to double (64 bit floating point). The precision is enough to accurately represent file sizes up to 8 petabytes (ca. 8.4 million gigabytes).