IPB

Welcome Guest ( Log In | Register )

120 Pages V  « < 104 105 106 107 108 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help.
MordredKLB
post Oct 21 2013, 02:13
Post #2626





Group: Members
Posts: 192
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



QUOTE (Falstaff @ Oct 20 2013, 08:07) *
happens with smaller interval size and heavy work on repaint. "Normal" scripts are not affected.

Yep, thanx, background color based on the cover color scheme, that's why i need v1.5.6 tongue.gif

How small an interval size? I typically have about 2-3 interval timers going with the shortest one often as low as 35ms and firing off a RepaintRect. My on_paint is currently about 1000 lines of code and does a lot of image drawing (full refresh takes about 200ms fully optimized, although the interval redraws for my seekbar typically are only 1-2ms). I've never noticed an issue with memory usage either.

Has TP Wang really disappeared? I thought he was participating in this thread fairly recently.
Go to the top of the page
+Quote Post
marc2003
post Oct 21 2013, 02:55
Post #2627





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



QUOTE (MordredKLB @ Oct 21 2013, 02:13) *
Has TP Wang really disappeared? I thought he was participating in this thread fairly recently.


according to his profile, he's not even browsed the site while logged in since last december.
Go to the top of the page
+Quote Post
mire777
post Oct 21 2013, 13:55
Post #2628





Group: Members
Posts: 245
Joined: 9-June 12
Member No.: 100550



I would suggest future request for thumbs:


I noticed that on_metadb_changed(), script not search for image, only when you press play it search image from last.fm. Because of that we have empty panel(or am I missing something in the settings).
I changed this in script for me..

About speed for catch image(it's good), but script wait that folder be full of 5 images, and after that it display's it in foobar.
If you click re-scan, you will see that it is alredy download 1-3 images. It would be good that script not wait, and immediately show that 1-3 images.


And finally. It would be good, that script continues to cycle images even if not pressed play.

besides this, script is perfect...
Go to the top of the page
+Quote Post
marc2003
post Oct 21 2013, 14:14
Post #2629





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



QUOTE (mire777 @ Oct 21 2013, 13:55) *
I noticed that on_metadb_changed(), script not search for image, only when you press play it search image from last.fm.


that's intended. when foobar isn't playing, selection changes can be rapid and i don't want to trigger loads of requests at once.

QUOTE
If you click re-scan, you will see that it is alredy download 1-3 images. It would be good that script not wait, and immediately show that 1-3 images.


for performance reasons, the thumbnail strip you see is actually one image generated by "stitching" all the images together. rescanning the folder destroys all the current images, gets a list of files, creates new image objects and creates the "stitched" image from scratch. if you ever see a delay when loading folders full of images that already exist, it's because of this "stitching". i don't think it would be a good idea to trigger this after each image has been downloaded.

whilst i'm not really sure why you'd be looking at the images in foobar when nothing is playing, i suppose i could use a timer to cycle images instead.
Go to the top of the page
+Quote Post
mire777
post Oct 21 2013, 14:38
Post #2630





Group: Members
Posts: 245
Joined: 9-June 12
Member No.: 100550



QUOTE (marc2003 @ Oct 21 2013, 15:14) *
QUOTE (mire777 @ Oct 21 2013, 13:55) *
I noticed that on_metadb_changed(), script not search for image, only when you press play it search image from last.fm.


that's intended. when foobar isn't playing, selection changes can be rapid and i don't want to trigger loads of requests at once.

QUOTE
If you click re-scan, you will see that it is alredy download 1-3 images. It would be good that script not wait, and immediately show that 1-3 images.


for performance reasons, the thumbnail strip you see is actually one image generated by "stitching" all the images together. rescanning the folder destroys all the current images, gets a list of files, creates new image objects and creates the "stitched" image from scratch. if you ever see a delay when loading folders full of images that already exist, it's because of this "stitching". i don't think it would be a good idea to trigger this after each image has been downloaded.

whilst i'm not really sure why you'd be looking at the images in foobar when nothing is playing, i suppose i could use a timer to cycle images instead.

Ok,i don't like an empty panel, so i changed this for me, now it search images on_metadb_changed().
Here script don't uses api, so i think it's not problem..
About re-scan i think you're right, i modified script to do that only once after 5 sec. play, and work ok.
Only that cycle is what missing..
Go to the top of the page
+Quote Post
marc2003
post Oct 21 2013, 15:03
Post #2631





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



QUOTE (mire777 @ Oct 21 2013, 14:38) *
Only that cycle is what missing..


done. right click>Update script.

full download: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip
changelog: https://dl.dropboxusercontent.com/u/2280132...h/changelog.txt
Go to the top of the page
+Quote Post
mire777
post Oct 21 2013, 15:20
Post #2632





Group: Members
Posts: 245
Joined: 9-June 12
Member No.: 100550



QUOTE (marc2003 @ Oct 21 2013, 16:03) *
QUOTE (mire777 @ Oct 21 2013, 14:38) *
Only that cycle is what missing..


done. right click>Update script.

full download: https://dl.dropboxusercontent.com/u/22801321/wsh/samples.zip
changelog: https://dl.dropboxusercontent.com/u/2280132...h/changelog.txt


Great Marc, thanks a lot! smile.gif
Go to the top of the page
+Quote Post
MordredKLB
post Oct 21 2013, 17:38
Post #2633





Group: Members
Posts: 192
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



QUOTE (marc2003 @ Oct 20 2013, 20:55) *
according to his profile, he's not even browsed the site while logged in since last december.
Ugh, that sucks. I recently saw he posted two pages ago in the official WSH component thread, but I hadn't realized that was almost a year ago.

At least all the code is in a public repository so someone can make changes and improvements if he's really gone for good.
Go to the top of the page
+Quote Post
marc2003
post Oct 21 2013, 18:13
Post #2634





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



update for a silly bug i introduced. right click>Update script. rolleyes.gif

CODE
7.2013-10-21.03

"Now playing" & "Thumbs". A change earlier today meant images with
uppercase lettters in their filename extension were ignored.
This has now been fixed.

Go to the top of the page
+Quote Post
Falstaff
post Oct 21 2013, 20:44
Post #2635





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



QUOTE (MordredKLB @ Oct 21 2013, 18:38) *
QUOTE (marc2003 @ Oct 20 2013, 20:55) *
according to his profile, he's not even browsed the site while logged in since last december.
Ugh, that sucks. I recently saw he posted two pages ago in the official WSH component thread, but I hadn't realized that was almost a year ago.

At least all the code is in a public repository so someone can make changes and improvements if he's really gone for good.


yep, someone to take the relay of T.P seems to be the way to go, unfortunatly for T.P that miss some news about him... but who is interrested and have the skills and time for ?


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
marc2003
post Oct 21 2013, 23:56
Post #2636





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



QUOTE (Falstaff @ Oct 21 2013, 20:44) *
but who is interrested and have the skills and time for ?


the problem is that all the people who are interested in it don't have the skills -afterall, that's why we're using it. and the people with the skills probably aren't interested. tongue.gif
Go to the top of the page
+Quote Post
mire777
post Oct 22 2013, 12:58
Post #2637





Group: Members
Posts: 245
Joined: 9-June 12
Member No.: 100550



Bug report for Thumbs & Now Playing:
In some cases, right click menu becomes unresponsible until ''download.vbs'' search image..
Go to the top of the page
+Quote Post
marc2003
post Oct 22 2013, 14:22
Post #2638





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



sorry but it's kind of unavoidable. i don't want to spawn multiple processes downloading all the images at once plus i'd have no way to tell when it's finished and when to rescan the folder.
Go to the top of the page
+Quote Post
MordredKLB
post Oct 22 2013, 15:51
Post #2639





Group: Members
Posts: 192
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



QUOTE (marc2003 @ Oct 21 2013, 17:56) *
the problem is that all the people who are interested in it don't have the skills -afterall, that's why we're using it. and the people with the skills probably aren't interested. tongue.gif

That's not necessarily true. I'm guessing I have most of the skills required and could probably pick up the rest if really needed. But I'd prefer not to as I don't really have the time to chase down hard to reproduce bugs. smile.gif
Go to the top of the page
+Quote Post
MordredKLB
post Oct 22 2013, 15:53
Post #2640





Group: Members
Posts: 192
Joined: 1-May 09
From: Austin, TX
Member No.: 69413



QUOTE (Falstaff @ Oct 20 2013, 02:58) *
so if these two features are not used, you can use v1.5.4 as well, it make sense when you know that v1.5.6 is not stable when using complex script that use timers and create a lot of objects (even if they are free from memory properly). The fix about tooltip brought by v1.5.5 & v1.5.6 has broken something in the handle of memory usage
TIPS: a way to fix this bug in v1.5.6 is to code a CollectGarbage() many times in the life of the script / memory usage done.

After saying that I had never encountered this, I might have encountered it yesterday. Can you explain what the symptom is? Does foobar crash? Does the WSHPanel script crash? Does foobar's memory usage skyrocket?
Go to the top of the page
+Quote Post
marc2003
post Oct 22 2013, 16:18
Post #2641





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



QUOTE (MordredKLB @ Oct 22 2013, 15:51) *
I'm guessing I have most of the skills required and could probably pick up the rest if really needed.


oh that's cool. we can start directing all bugs and feature requests at you now. laugh.gif

Go to the top of the page
+Quote Post
Falstaff
post Oct 22 2013, 22:38
Post #2642





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



QUOTE (MordredKLB @ Oct 22 2013, 16:53) *
QUOTE (Falstaff @ Oct 20 2013, 02:58) *
so if these two features are not used, you can use v1.5.4 as well, it make sense when you know that v1.5.6 is not stable when using complex script that use timers and create a lot of objects (even if they are free from memory properly). The fix about tooltip brought by v1.5.5 & v1.5.6 has broken something in the handle of memory usage
TIPS: a way to fix this bug in v1.5.6 is to code a CollectGarbage() many times in the life of the script / memory usage done.

After saying that I had never encountered this, I might have encountered it yesterday. Can you explain what the symptom is? Does foobar crash? Does the WSHPanel script crash? Does foobar's memory usage skyrocket?


generally panel crash on a gdiDrawText method, or if not crashing the panel become white (no repaint) for a little lapse of time, then came back on mouse move. Experiencing this repaint bug more than 2 times generate WSH panel Mod panel to freeze (a WSH panel mod window open over the fooobar2000 window and foobar2000 freezed until it crashed.

that's the common symptoms encountered.



--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
mire777
post Oct 23 2013, 09:53
Post #2643





Group: Members
Posts: 245
Joined: 9-June 12
Member No.: 100550



QUOTE (marc2003 @ Oct 22 2013, 15:22) *
sorry but it's kind of unavoidable. i don't want to spawn multiple processes downloading all the images at once plus i'd have no way to tell when it's finished and when to rescan the folder.


if you run 'download.vbs' as a fully independent process, and set that wsh only check folder if is full with 5 images, maybe you can do something.. Or that wsh monitor process in task mngr. , and when it ends to rescan folder.
It stuck because wsh wait .vbs to end.
I'm sure that you can prevent this..
Not big problem, but it's best to fix...
If not possible at all, ok...

This post has been edited by mire777: Oct 23 2013, 09:56
Go to the top of the page
+Quote Post
marc2003
post Oct 23 2013, 10:31
Post #2644





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



i've already given the reasons for why i'm not changing it. if you can't suppress your need to right click the panel for a few seconds then don't use it.

i have updated it to display a little hourglass when it's working. at least that shows it's doing something. right click>Update script.
Go to the top of the page
+Quote Post
mire777
post Oct 23 2013, 10:45
Post #2645





Group: Members
Posts: 245
Joined: 9-June 12
Member No.: 100550



QUOTE (marc2003 @ Oct 23 2013, 11:31) *
i've already given the reasons for why i'm not changing it. if you can't suppress your need to right click the panel for a few seconds then don't use it.

i have updated it to display a little hourglass when it's working. at least that shows it's doing something. right click>Update script.


That's great smile.gif . Not problem at all, i use it, and love. in many ways it's better than the standard 'foo_uie_biography' was.
I just asked if possible, if you missed something...
Thanks smile.gif

This post has been edited by mire777: Oct 23 2013, 10:47
Go to the top of the page
+Quote Post
foomark
post Oct 23 2013, 11:16
Post #2646





Group: Members
Posts: 87
Joined: 12-July 11
Member No.: 92213



Hi marc2003, i'd like to visualize the seven weblinks buttons in the middle of the wsh panel, would it be possible? smile.gif
Reading the script i can see that changing the first number for every button i can move it orizzontally, but i'd like to have it always centered, also if i resize the panel.
Is there a way to achieve it?
Go to the top of the page
+Quote Post
marc2003
post Oct 23 2013, 11:29
Post #2647





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



if you have 7 buttons and they are each 32px in width, that's 224. now subtract that from the panel width and divide it by 2. that gives you the x co-ordinate of where the first button should be....

CODE
var but_x = Math.round((p.w - 224) / 2);


use but_x for the first button and then increment each one by 32 (but_x + 32, but_x + 64 etc)

you also need to make sure you call the b.update() function inside the on_size function like this...

CODE
function on_size() {
    p.size();
    b.update();
}
Go to the top of the page
+Quote Post
foomark
post Oct 23 2013, 12:08
Post #2648





Group: Members
Posts: 87
Joined: 12-July 11
Member No.: 92213



QUOTE (marc2003 @ Oct 23 2013, 12:29) *
if you have 7 buttons and they are each 32px in width, that's 224. now subtract that from the panel width and divide it by 2. that gives you the x co-ordinate of where the first button should be....

CODE
var but_x = Math.round((p.w - 224) / 2);


use but_x for the first button and then increment each one by 32 (but_x + 32, but_x + 64 etc)

you also need to make sure you call the b.update() function inside the on_size function like this...

CODE
function on_size() {
    p.size();
    b.update();
}


This shouldn't be hard at all, but i'm missing something...
That's the panel where i'd like to center the icons:


That's how i edited your original weblinks script:
CODE
// ==PREPROCESSOR==
// @import "%fb2k_profile_path%marc2003\common7.js"
// @name "Web Links"
// @author "marc2003. Images by komodomedia.com and mjm716"
// @feature "v1.4"
// @feature "watch-metadb"
// ==/PREPROCESSOR==

var p = new panel("Web Links", ["custom_background", "metadb"]);
p.version = "7.2013-04-20.02";
p.filename = "web links.txt";
var b = new buttons();
var but_x = Math.round((p.w - 224) / 2);
p.check_version();

b.update = function() {
        if (!p.metadb) return;
        var artist = encodeURIComponent(p.eval("%artist%"));
        var title = encodeURIComponent(p.eval("%title%"));
        var lastfm = "http://www.last.fm/music/" + artist + "/_/" + title;
        var google = "https://www.google.co.uk/search?q=" + artist;
        var wikipedia = "http://en.wikipedia.org/wiki/" + artist;
        var youtube = "http://www.youtube.com/results?search_query=" + artist + "+" + title;
        var discogs = "http://www.discogs.com/search?q=" + artist;
        var myspace = "http://www.myspace.com/search/music?q=" + artist;
        var allmusic = "http://www.allmusic.com/search/artists/" + artist;
      
        b.buttons = {
                lastfm: new button(but_x, 0, 32, 32, {normal: "lastfm.png", hover: "lastfm_h.png"}, function() { p.browser(lastfm); }, lastfm),
                google: new button(but_x+32, 0, 32, 32, {normal: "google.png", hover: "google_h.png"}, function() { p.browser(google); }, google),
                youtube: new button(but_x+64, 0, 32, 32, {normal: "youtube.png", hover: "youtube_h.png"}, function() { p.browser(youtube); }, youtube),
                wikipedia: new button(but_x+96, 0, 32, 32, {normal: "wikipedia.png", hover: "wikipedia_h.png"}, function() { p.browser(wikipedia); }, wikipedia),
                discogs: new button(but_x+128, 0, 32, 32, {normal: "discogs.png", hover: "discogs_h.png"}, function() { p.browser(discogs); }, discogs),
                myspace: new button(but_x+160, 0, 32, 32, {normal: "myspace.png", hover: "myspace_h.png"}, function() { p.browser(myspace); }, myspace),
                allmusic: new button(but_x+192, 0, 32, 32, {normal: "allmusic.png", hover: "allmusic_h.png"}, function() { p.browser(allmusic); }, allmusic),
              
        }
        window.Repaint();
}

on_item_focus_change();

function on_size() {
    p.size();
    b.update();
}

function on_paint(gr) {
        p.draw_background(gr);
        b.draw(gr);
}

function on_metadb_changed() {
        b.update();
}

function on_mouse_move(x, y) {
        b.move(x, y);
}

function on_mouse_lbtn_up(x, y) {
        b.lbtn_up(x, y);
}


And that's how i end up having the panel:


There's no doubt i'm a noob, sorry...
Go to the top of the page
+Quote Post
marc2003
post Oct 23 2013, 12:16
Post #2649





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



sorry it's my fault for not being clear. this...

CODE
var but_x = Math.round((p.w - 224) / 2);


should go inside the b.update() function.

CODE
var but_x = Math.round((p.w - 224) / 2);
b.buttons = {
   lastfm:
Go to the top of the page
+Quote Post
foomark
post Oct 23 2013, 12:25
Post #2650





Group: Members
Posts: 87
Joined: 12-July 11
Member No.: 92213



QUOTE (marc2003 @ Oct 23 2013, 13:16) *
sorry it's my fault for not being clear. this...

CODE
var but_x = Math.round((p.w - 224) / 2);


should go inside the b.update() function.

CODE
var but_x = Math.round((p.w - 224) / 2);
b.buttons = {
   lastfm:


I did some "random" test with the position of the string but i didn't the right one biggrin.gif
Thank you very much, it's perfect now!!
Go to the top of the page
+Quote Post

120 Pages V  « < 104 105 106 107 108 > » 
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: 16th April 2014 - 18:20