IPB

Welcome Guest ( Log In | Register )

60 Pages V  « < 57 58 59 60 >  
Reply to this topicStart new topic
WSH Panel Mod, foo_uie_wsh_panel_mod
Falstaff
post Jan 30 2013, 19:19
Post #1451





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



Changelog:

v1.5.6
- FIX: 'Clear' button in Properties doesn't work since v1.5.5.

v1.5.5
- FIX: Fix a bug that preprocessor "tooltip" didn't work at all.
- ADD: Added GetColorScheme() method to IGdiBitmap interface.

==> please, consider to remove the FIX on tooltip added in V1.5.5, it makes WSH panel Mod unstable, may crashes (brutal with a black window named WSH Panel Mod that appear on freeze in the main foobar2000 window...

i hope all is fine for you, long time you are not been here.

Regards,

Br3tt

This post has been edited by Falstaff: Jan 30 2013, 19:19


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
Haanz
post Feb 28 2013, 13:51
Post #1452





Group: Members
Posts: 3
Joined: 28-February 13
Member No.: 106940



Is there a foobar2000 javascript reference?

For example how should I know what properties "fb" object have? Or how to properly initiate a Button. And so on...

Thanks.
Go to the top of the page
+Quote Post
marc2003
post Feb 28 2013, 14:06
Post #1453





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE
what properties "fb" object have?


check interfaces.txt in the docs.

as for buttons, it's basically creating your own from scratch. at it's most simple you can draw an image/text and check the position of the mouse when it's clicked to trigger a function.

or you can write your own object. see tooltip.txt in the samples folder to get started.
Go to the top of the page
+Quote Post
Haanz
post Mar 1 2013, 08:55
Post #1454





Group: Members
Posts: 3
Joined: 28-February 13
Member No.: 106940



QUOTE (marc2003 @ Feb 28 2013, 14:06) *
as for buttons, it's basically creating your own from scratch. at it's most simple you can draw an image/text and check the position of the mouse when it's clicked to trigger a function.

or you can write your own object. see tooltip.txt in the samples folder to get started.


Thanks.

Examined tooltip.txt. There is a constructor here:

CODE
function SampleButton(x, y, w, h, caption, func, tiptext) {
    // 'Constructor' stuff
    this.left = x;
    this.top = y;
    this.w = w;
    this.h = h;
    this.right = x + w;
    this.bottom = y + h;
    this.caption = caption;
    this.func = func;
    this.tiptext = tiptext;
...
}


But where is the object "SampleButton" declaration by itself? Where can I find the whole properties and functions list?

One more thing. What is this syntaxis?

CODE
ButtonStates = {
    normal: 0,
    hover: 1,
        down: 2,
    hide: 3
}


Could not find this initialization style in Java guides...

This post has been edited by Haanz: Mar 1 2013, 08:56
Go to the top of the page
+Quote Post
marc2003
post Mar 1 2013, 09:30
Post #1455





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE
But where is the object "SampleButton" declaration by itself?


right at the bottom in the on_size function.

and i think that other thing is just another custom bit of code written by the author. check the SimpleThemedButton sample.
Go to the top of the page
+Quote Post
Haanz
post Mar 1 2013, 11:08
Post #1456





Group: Members
Posts: 3
Joined: 28-February 13
Member No.: 106940



QUOTE (marc2003 @ Mar 1 2013, 09:30) *
right at the bottom in the on_size function.


Nope. Its an array declaration.

QUOTE (marc2003 @ Mar 1 2013, 09:30) *
another custom bit of code written by the author. check the SimpleThemedButton sample.


The same thing. Only constructor.

Go to the top of the page
+Quote Post
marc2003
post Mar 1 2013, 11:41
Post #1457





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (Haanz @ Mar 1 2013, 10:08) *
Nope. Its an array declaration.


and if you look inside the SampleButtons array, you'll find....

CODE
        stop: new SampleButton(5, buttonY, 60, 30, "Stop", function() {
            fb.Stop();
        },
        "Stop")


i don't really understand your 2nd point. like i said, it's custom code. it's what the author decided to do at the time. nothing more. there is no documentation other than the functions exposed in interfaces.txt and callbacks.txt. sometimes it hard to understand how it all works together which is why some samples have been bundled with the component. you may find they are not the most optimal way of doing things but it's a start.

remember you're not just limited to the built in functions. you can load activex objects to run external programs, manipulate files, access the internet, etc. that's all standard jscript which you can read about on MSDN.

This post has been edited by marc2003: Mar 1 2013, 11:54
Go to the top of the page
+Quote Post
doc0047
post Mar 3 2013, 02:33
Post #1458





Group: Members
Posts: 1
Joined: 3-March 13
Member No.: 106985



New to foobar this weekend smile.gif I've been on the couch for 9 hours now.

My question is about using last.fm to display pics and biographies.

Even if the biography is showing the current artist bio, the artist pictures are replaced with folder art.

I can't figure this out! Any advise would literally help me sleep tonight.
Go to the top of the page
+Quote Post
marc2003
post Mar 3 2013, 11:41
Post #1459





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



vague post is vague. how is anybody supposed to know what you are talking about? i suppose you've found a last.fm script of some sort but unfortunately no one here is psychic enough to know which one.

also, you should probably post in this thread. this thread is really for component bug reports/feature requests/help with specific functions.

This post has been edited by marc2003: Mar 3 2013, 11:42
Go to the top of the page
+Quote Post
marc2003
post Mar 10 2013, 15:50
Post #1460





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



i'm not sure whether it's worth reporting bugs as T.P doesn't seem to be around these days. hope he's ok. smile.gif

i've found a problem with getting the name from a font object.

CODE
var font = window.GetFontDUI(0);
var name = font.Name;


for the majority of people, the name is going Segoe UI if their font is left at the default. i imagine most standard fonts are fine as well. no problem there.

but today someone reported that the function fails with Small Fonts. you get this error in the console....

Unable to get value of the property 'Name': object is null or undefined

upon checking the font properties, i see this...



looks like the Title has multiple values stored internally but WSH panel mod can't handle it. for now i'm catching errors and defaulting to a standard font.

Go to the top of the page
+Quote Post
extracampine
post Mar 25 2013, 22:45
Post #1461





Group: Members
Posts: 204
Joined: 24-July 07
Member No.: 45592



Marc (or anyone else): another quick request for some help with code smile.gif

My code for listing albums by compilations:

$if($strstr(%album artist%,Various Artists),
$puts(chr1,$upper($left(%album%,1)))
$if($strcmp($get(chr1),$lower($get(chr1))),$puts(chr1,'#'))
$get(chr1)[|%series%]|$swapprefix(%album%) ['('%date%')'][|'Disc '%disc number%][' - '%discname%]|[%tracknumber%. ]%track artist% - %title%' '['('%rating_stars%')'])

This lists compilations by letter, with all non-letters (i.e. numbers or symbols) listed under "#". It groups compilations by series then album.

I want to make one change but I'm not sure about the code - currently it moves the prefix to the end (which is what I want). However, it still lists the compilation under the letter of the prefix. For example, "The Summer of Love" is listed under the letter T as "Summer of Love, the".

I want it to be listed under the letter S as "Summer of Love, the". Any help with changing my code to do this? Many thanks!
Go to the top of the page
+Quote Post
marc2003
post Mar 26 2013, 10:59
Post #1462





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



i have no idea why you've asked a bog standard album list title formatting question in this thread? rolleyes.gif

but to answer it, you just need to use $swapprefix on the first instance of %album% in your code.
Go to the top of the page
+Quote Post
extracampine
post Mar 26 2013, 18:06
Post #1463





Group: Members
Posts: 204
Joined: 24-July 07
Member No.: 45592



I'm sorry I thought this is where I had asked it before! I remember you helping me out - thanks!

So like this?

$if($strstr(%album artist%,Various Artists),
$puts(chr1,$upper($left$swapprefix(%album%,1)))
$if($strcmp($get(chr1),$lower($get(chr1))),$puts(chr1,'#'))
$get(chr1)[|%series%]|$swapprefix(%album%) ['('%date%')'][|'Disc '%disc number%][' - '%discname%]|[%tracknumber%. ]%track artist% - %title%' '['('%rating_stars%')'])

It just lists in a long list and doesn't group by letter!

This post has been edited by extracampine: Mar 26 2013, 18:10
Go to the top of the page
+Quote Post
Propheticus
post Mar 26 2013, 18:21
Post #1464





Group: Members
Posts: 218
Joined: 10-September 11
Member No.: 93615



QUOTE (extracampine @ Mar 26 2013, 18:06) *
It just lists in a long list and doesn't group by letter!


like this:

$if($strstr(%album artist%,Various Artists),
$puts(chr1,$upper($left($swapprefix(%album%),1)))
$if($strcmp($get(chr1),$lower($get(chr1))),$puts(chr1,'#'))
$get(chr1)[|%series%]|$swapprefix(%album%) ['('%date%')'][|'Disc '%disc number%][' - '%discname%]|[%tracknumber%. ]%track artist% - %title%' '['('%rating_stars%')'])
Go to the top of the page
+Quote Post
extracampine
post Mar 26 2013, 21:15
Post #1465





Group: Members
Posts: 204
Joined: 24-July 07
Member No.: 45592



Nice - thanks!!
Go to the top of the page
+Quote Post
extracampine
post Mar 31 2013, 00:41
Post #1466





Group: Members
Posts: 204
Joined: 24-July 07
Member No.: 45592



One other question - my sort by artist code looks like this:

$puts(artstr,$swapprefix($trim(%album artist%)))
$puts(chr1,$upper($left($get(artstr),1)))
$if($strcmp($get(chr1),$lower($get(chr1))),$puts(chr1,'#'))
$get(chr1)|$get(artstr)[|[%seriesyear% -] %series%]|[%date% - ]%album% ['('%copyright%', '%tdrl%')'][|'Disc '%disc number%][' - '%discname%]|[%tracknumber%. ][%track artist% - ]%title%' '['('%rating_stars%')']

How can I get it to show the %tdrl% ONLY if it is different from the %date%? For example, if date and tdrl have the same value then %tdrl% should not be shown. But if they have a different value, then it should.

Thanks biggrin.gif

This post has been edited by extracampine: Mar 31 2013, 00:41
Go to the top of the page
+Quote Post
marc2003
post Mar 31 2013, 11:51
Post #1467





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



just because i made the stupid mistake of answering your question last time doesn't mean you should continue to post completely off topic posts in this thread. rolleyes.gif

This post has been edited by marc2003: Mar 31 2013, 12:07
Go to the top of the page
+Quote Post
extracampine
post Mar 31 2013, 12:05
Post #1468





Group: Members
Posts: 204
Joined: 24-July 07
Member No.: 45592



lol....aw...so whats the thread?
Go to the top of the page
+Quote Post
marc2003
post Mar 31 2013, 12:17
Post #1469





Group: Members
Posts: 4326
Joined: 27-January 05
From: England
Member No.: 19379



search first. if you can't find anything related, start a new one in the General section. remember to use a descriptive thread title to keep the mods happy. tongue.gif
Go to the top of the page
+Quote Post
Propheticus
post Mar 31 2013, 15:19
Post #1470





Group: Members
Posts: 218
Joined: 10-September 11
Member No.: 93615



Also: you might want to read the documentation on title formatting (html included within foobar installfolder linked to on multiple occasions throughout the program's preferences) and trying to figure this out yourself before searching(!) And asking....
Go to the top of the page
+Quote Post
r0lZ
post Apr 12 2013, 17:25
Post #1471





Group: Members
Posts: 107
Joined: 18-July 08
Member No.: 55947



Not sure this has already be noticed by someone. I have switched recently to Windows 8 (x64) and kept my old foobar2000 config (from W7 x64), with all WSHPM scripts. They work as expected, except one thing. The mouse wheel doesn't work in WSH panels any more. More precisely, the delta of the on_mouse_wheel function is always 0.
In other words, this script prints some zeroes in the log when the wheel is activated:
CODE
function on_mouse_wheel(delta) {
    fb.trace(delta);
}

The wheel of my standard Microsoft mouse works correctly in all Windows programs and in Foobar2000, except in WSH panels.

The fact that the callback is called when the wheel is activated means that my mouse is correctly recognised, but the delta sent by the hardware is probably different than the delta of other mouses. I've read somewhere that old mouses reports a specific delta value (maybe 64 and -64, but I don't remember), but recent mouses are more precise and may report small deltas such as 1. That might be the case of my relatively recent mouse. I guess that WSHPM divides the delta by 64 (or whatever) to convert it to 1 or -1, and that may be the reason why the result is always 0. If it's the case, it it possible to fix that little bug in a forthcoming version? Thanks in advance.

Also, I have not installed the M$ Mouse and Keyboard Center because imo it is useless, but iirc it was installed on my old system. Could it be necessary?

This post has been edited by r0lZ: Apr 12 2013, 17:27
Go to the top of the page
+Quote Post
Falstaff
post Apr 12 2013, 21:18
Post #1472





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



@r0lZ

similar problem already encoutered with some mouses, driver of the mouse to install to fix the problem... but right, the problem only occured in WSHPM, but as driver fix the issue, all is fine.

This post has been edited by Falstaff: Apr 12 2013, 21:18


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
r0lZ
post Apr 13 2013, 10:48
Post #1473





Group: Members
Posts: 107
Joined: 18-July 08
Member No.: 55947



Thanks, Falstaff.

According to the Device Manager control panel, my mouse did not need any driver. But I have installed the M$ Mouse and Keyboard Center anyway. (It's a pity btw. I don't need its features, and it launches 7 additional programs at Windows startup!) That was not sufficient to fix the problem. I had to go to "Mouse And Keyboard Center -> Basic Settings -> Identify programs that don't scroll correctly" and select Foobar2000. That fixed the problem, with a little drawback: now the non-WSH panels scroll more rapidly than before (approx 3 lines at a time instead of 1). Not a big deal.

Furthermore, I've noticed that after a reboot, when F2K is launched immediately, the WSH panels do not scroll. I have to wait at least one minute or so before they begin to work correctly. I suppose it's because the Mouse and Keyboard Center takes a long time to start.

IMO, it's not really a driver issue. The M&K Center is just an additional program to tune the mouse and keyboard behaviours with certain programs (mainly games), and should not be necessary for standard programs, such as F2K. So, IMO, there is still something to fix in WSHMP. Perhaps you should just test if the delta reported by the hardware is positive or negative, and convert it to 1 or -1 accordingly. Just my 2 cents.

The issue is solved, that's right, but the fix is not perfect, and should not be needed.
Thanks anyway for the pointer.

This post has been edited by r0lZ: Apr 13 2013, 10:49
Go to the top of the page
+Quote Post
vothanhdat
post Jun 7 2013, 02:40
Post #1474





Group: Members
Posts: 2
Joined: 5-June 13
Member No.: 108497



How do I get library RelativePath in wshpanel mod.
I`m coding "WSH libray search and viewer" but I don`t know how to get library RelativePath;
WSH library search
Go to the top of the page
+Quote Post
Falstaff
post Jul 7 2013, 17:02
Post #1475





Group: Members
Posts: 2797
Joined: 12-November 06
Member No.: 37463



@vothanhdat

you can't retreive it with WSH panel mod. the best way is to work with an autoplaylist that contains the whole library (e.g %path% PRESENT) and to browse it with plman.

HTH


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post

60 Pages V  « < 57 58 59 60 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th April 2014 - 15:40