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 1399899 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WSH Panel Mod script discussion/help

Reply #825
@Falstaff

Thanks for telling where the problem lied. In my casse there was a problem with folder attributes: both Music and Videos were set as "Ready for archiving" and this gave them an attribute of 48. Remove that, they became 16 and all was OK.

However, we noticed a few values which were viewable by default, but shouldn't, for security reasons (with some examples):

18 - C:\Program Data
21 - C:\Windows\assembly
22 - $RECYCLE.BIN, System Volume Information
1046 - C:\Documents and Settings
2064 - C:\Windows\System32\DRVSTORE

This being the case, we just negated those values (maybe others will add more) and went with the modified lines 536->543 :

Quote
for (; !oFolders.atEnd(); oFolders.moveNext()) {
        item_fld = oFolders.item();
        // ajout nouveau noeud
        fb.trace("fld name = "+item_fld.Name+" hase an attrb value = "+item_fld.Attributes);
        if(item_fld.Attributes!=22&&item_fld.Attributes!=21&&item_fld.Attributes!=18&&item_fld.Attributes!=2064&&item_fld.Attributes!=1046) {
            node.addchild(item_fld.Name, item_fld.Path);
            if(recursive) {
                FillTreeLevel(item_fld.Path, node.child[node.child.length-1], true);


Sorry, I don't know how to format this ^, but I believe you'll manage it. 
In any case, if you wish to remain with a syntax for allowing parameters, include 48; I believe this is done automatically once a folder reaches >10GB (don't quote me on that)

Hope this helps!

WSH Panel Mod script discussion/help

Reply #826
Hey

I love the uses people are finding for this component and I have a request of someone who might be able to code.  I plan on trying to learn some JavaScript this summer but You guys might be able to whip this up really quickly.

What I am looking for is a comibnation of the nowplaying.txt and the artreader.txt last.fm scripts that I do believe were written by marc2003.

Instead of displaying the artist photo, I wanted it to display the album that is in the same folder as the album and called folder.jpg.  But on top of that I want the band, track, and album.  It's pretty much the same except the artist photo and album are switched.

Is this possible.  It would be greatly appreciated.

Thanks!


WSH Panel Mod script discussion/help

Reply #828
Holy hell!  That was such a fast reply!  Thanks.

Is there anyway I can have it so that the full album are will always be shown?  Right now it's cutting the top and bottom off the artwork.

I guess what I am looking for is the artwork to fit the window and have black bars on the side.


WSH Panel Mod script discussion/help

Reply #829
on line 57, replace "max" with "min".

then insert this before immediately before line 57.

Code: [Select]
gr.FillSolidRect(0, 0, ww, wh, g_backcolor);


the background will then match the default from the DUI colour preferences.

WSH Panel Mod script discussion/help

Reply #830
on line 57, replace "max" with "min".

then insert this before immediately before line 57.

Code: [Select]
gr.FillSolidRect(0, 0, ww, wh, g_backcolor);


the background will then match the default from the DUI colour preferences.


You are a god among men.  Thank you so much.  By the way, where is that you usually post the most up to date samples.zip.  Is it in this thread usually?

WSH Panel Mod script discussion/help

Reply #831
this thread is it's home. the link doesn't change and i usually post whenever i update it - either for fixes or something new.

WSH Panel Mod script discussion/help

Reply #832
Great!  Those samples are pretty much my whole config.

WSH Panel Mod script discussion/help

Reply #833
Hi!

I have a what I hope will be a fairly small request. I'm using marc2003's last.fm scripts and they're great for everything except classical music. By and large, classical music is tagged in such a way that it's impossible for last.fm to keep track of the artists (for example, they can't have a page for each of the combinations of musicians that Jacqueline du Pre has performed chamber music with). So, instead of having the last.fm panels looking for information on the artist, would it be possible to have the scripts look at the last.fm page for the composer when the genre is "Classical"? Specifically, I make use of the "Now Playing", "Simple Biography" and "Similar Artists" panels, but I assume the code would be transferrable between them.

A second (but much less important) question I have is, how would I create something like a 32x32 pixel box that numerically shows what the volume level is? I rely entirely on hotkeys to change my volume, so I removed the volume slidebar, but it would be nice to have an indication of the volume somewhere. If there's an existing volume slidebar similar to the "Aero Seekbar" I wouldn't mind using that either, but I haven't been able to find one yet.

Any help or advice on how to do this would be awesome

WSH Panel Mod script discussion/help

Reply #834
i'll add an option for last.fm artist field remapping in the next few days.

as for a volume indicator, just right click your status bar and enable it.

WSH Panel Mod script discussion/help

Reply #835
Thanks, that sounds great  Just one thing, I would prefer to have it look at composer only if the genre is classical. For everything else artist is still best. Sorry if this is extra effort.

WSH Panel Mod script discussion/help

Reply #836
i'll make it so you can configure it yourself with standard foobar title formatting. %artist% would be the default but you could use something like this....

Code: [Select]
$if($stricmp(%genre%,classical),%composer%,%artist%)

WSH Panel Mod script discussion/help

Reply #837
Perfect! It took me about three hours yesterday to get a short 'if' script to work using the standard foobar title formatting, but after spending that much time working on the script I feel quite comfortable using standard foobar formatting now

WSH Panel Mod script discussion/help

Reply #838
http://cid-649d3bfeaf541fbb.office.live.co...ide/samples.zip

i've updated the "simple biography" script with artist field remapping. the option is on the context menu. i'm too lazy to do the other scripts just yet.

for existing users, the files from the zip must be extracted again overwriting all as one has changed.

WSH Panel Mod script discussion/help

Reply #839
Thanks for the update  It works great so far. Sorry if it's a lot of effort (I saw the file size for simple biography increased quite a bit), I thought it would be one or two lines of code... Much appreciated!

WSH Panel Mod script discussion/help

Reply #840
Marc,
it is not possible for me to set api_key and username true the context menu it won't open, i mean it will open the menu but if i click (set your lastfm username) same for (api_key) nothing happens.
So in the console the error pops up WSH Simple Biography: Can't contact Last.fm. Check your username / API KEY settings.



I hope you can help me.,

 

WSH Panel Mod script discussion/help

Reply #841
when you select that option from the menu, it calls an external script with a .wsf file extension. possible reasons it's not working

-file type associations have been messed with
-machine is locked down and scripts aren't allowed to run
-you're not running windows

workaround: browse to %appdata%\foobar2000\wsh_settings and create 2 files named

username
api_key

make sure they have no file extensions at all and then edit each one in notepad and save the relevant details in each one. the script will need reloading to pick up the new details.

WSH Panel Mod script discussion/help

Reply #842
when you select that option from the menu, it calls an external script with a .wsf file extension. possible reasons it's not working

-file type associations have been messed with
-machine is locked down and scripts aren't allowed to run
-you're not running windows

workaround: browse to %appdata%\foobar2000\wsh_settings and create 2 files named

username
api_key

make sure they have no file extensions at all and then edit each one in notepad and save the relevant details in each one. the script will need reloading to pick up the new details.



Thx it is solved.
As you suggested it was the file association that was't correct.

Thanks.

WSH Panel Mod script discussion/help

Reply #843
Hello, I have a question. I'm using many of your samples, for which I wanna say my thanks. But I'm having issue with the aero seekbar. I want to change the colour of the timer, but the only variable I can link to the timer is this:
Code: [Select]
var g_font = gdi.Font("Segoe UI", 12, 0);

which only chooses the font. How can I change the font colour?

WSH Panel Mod script discussion/help

Reply #844
line 44:

Code: [Select]
gr.GdiDrawtext(txt, g_font, RGB(0,0,0), 0, 0, ww-10, wh, DT_VCENTER | DT_RIGHT | DT_CALCRECT | DT_NOPREFIX);


you can change the colour in the RGB function.

WSH Panel Mod script discussion/help

Reply #845
line 44:

Code: [Select]
gr.GdiDrawtext(txt, g_font, RGB(0,0,0), 0, 0, ww-10, wh, DT_VCENTER | DT_RIGHT | DT_CALCRECT | DT_NOPREFIX);


you can change the colour in the RGB function.


Oh, FFS I've literally slept through that line. Thanks, that was a dumb question.

WSH Panel Mod script discussion/help

Reply #846
Ok, I've got another dumb question. I'm using your simple buttons for playback. I've also configured one to be a preferences button, but I've got a question. Is there a way to make another button which when pressed the file menu would open? Here's my code for the preferences button, I guess it'd be something similar, I just don't know the exact function.

Code: [Select]
    but6: new Button((bw*17) + left_margin,top_margin,bw,bh, {normal: images_path + "pref.png", hover: images_path + "pref_h.png"}, function(){fb.ShowPreferences();}, "Preferences")

WSH Panel Mod script discussion/help

Reply #847
have a look at the samples from the component homepage. inside is an example of how to have the full menu pop out from a mouse click.

WSH Panel Mod script discussion/help

Reply #848
Marc, your Now Playing script doesn't appear to be downloading artist art... I've let it go while two songs were playing for an artist, and nothing ever changed from the default background.

WSH Panel Mod script discussion/help

Reply #849
seems to be working ok here. perhaps a temporary glitch at the last.fm end? and have you checked art definitely exists for the artist by visiting the page?

as for your PM request, i've updated the "now playing" script so you can turn off the front cover display via the context menu,

http://cid-649d3bfeaf541fbb.office.live.co...ide/samples.zip