IPB

Welcome Guest ( Log In | Register )

125 Pages V  « < 64 65 66 67 68 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help.
rawny
post May 18 2012, 14:38
Post #1626





Group: Members
Posts: 30
Joined: 27-January 09
Member No.: 66042



QUOTE (MDMA @ May 18 2012, 13:30) *
When I try and rename my playlist tabs or sort the playlist, WSH mod crashes. Using foobar 1.1.11 wsh panel mod 1.5.3.1 any help would be appreciated


Might help to name/describe the scripts you are using, how many WSH panels you have open, which playlist components you are using etc. smile.gif
Go to the top of the page
+Quote Post
Falstaff
post May 18 2012, 14:47
Post #1627





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



QUOTE (MDMA @ May 18 2012, 15:30) *
When I try and rename my playlist tabs or sort the playlist, WSH mod crashes. Using foobar 1.1.11 wsh panel mod 1.5.3.1 any help would be appreciated


for the crash on rename (i assumed you use my WSH tabbed playlist manager script), just untick (as usual) the "Safe Mode" option in WSH settings in foobar2000 Preferences pages!

for the crash issue on sort, if you talk about the search menu from my WSH playlist viewer, it should work except if you're not using the last version of WSH PAnel Mod which is 1.5.3.1, or you said you got it (verify please in Preferences> Components...), so thanx to give here more details or most of all the content of the console (error message + line number in error) ==> menu View>Console.

HTH


--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
r0k
post May 20 2012, 10:39
Post #1628





Group: Members
Posts: 74
Joined: 8-September 11
Member No.: 93574



Hi again.
I have another issue trying to understand some examples. I'm looking at the sample scripts drawing buttons. Both the basic samples and those provided by marc2003 use the same constructor function. I'm clueless on this part :
CODE
    this.draw = function (gr) {
           if (this.state == ButtonStates.hide) return;
          
           switch (this.state)
           {
          ... <snip> ...
           }
  
           g_theme.DrawThemeBackground(gr, this.x, this.y, this.w, this.h);
           gr.GdiDrawText(this.text, g_font, RGB(0,0,0), this.x, this.y, this.w, this.h, DT_CENTER| DT_VCENTER | DT_CALCRECT | DT_NOPREFIX);
       }

The method defined here receives an argument called gr and uses it as an argument to g_theme.DrawThemeBackground. However, whenever a <button>.draw method is called in any sample i've seen, the argument passed to it is also simply gr. But nowhere i found a statement defining gr blink.gif
I found a reference to gr in callbacks but it states it's invalid outside of two specific callbacks : on_tooltip_custom_paint and on_paint. Here it's used by drawAllButtons(gr) function.

Surely i'm missing something. I guess i could just copy-paste working scripts without wondering how they are working but this looks like a sure-way to big mistakes later on.

Also, there is also this gr.GdiDrawText() method used in the sample. According to what i understood from the doc this method belongs to an IGdiGraphics interface that fist has to be created by the method GetGraphics() of an IGdiBitmap interface, itself created by some methods of the "first-level" interfaces window or gdi. Again, i guess i missed something.

Can someone help me understand how this works?
Go to the top of the page
+Quote Post
MDMA
post May 21 2012, 00:02
Post #1629





Group: Members
Posts: 75
Joined: 23-May 10
Member No.: 80861



QUOTE (Falstaff @ May 18 2012, 14:47) *
QUOTE (MDMA @ May 18 2012, 15:30) *
When I try and rename my playlist tabs or sort the playlist, WSH mod crashes. Using foobar 1.1.11 wsh panel mod 1.5.3.1 any help would be appreciated


for the crash on rename (i assumed you use my WSH tabbed playlist manager script), just untick (as usual) the "Safe Mode" option in WSH settings in foobar2000 Preferences pages!

for the crash issue on sort, if you talk about the search menu from my WSH playlist viewer, it should work except if you're not using the last version of WSH PAnel Mod which is 1.5.3.1, or you said you got it (verify please in Preferences> Components...), so thanx to give here more details or most of all the content of the console (error message + line number in error) ==> menu View>Console.

HTH


Thanks, I've solved both problems. Loving the scripts!
Go to the top of the page
+Quote Post
marc2003
post May 21 2012, 04:24
Post #1630





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



QUOTE (r0k @ May 20 2012, 10:39) *
I found a reference to gr in callbacks but it states it's invalid outside of two specific callbacks : on_tooltip_custom_paint and on_paint. Here it's used by drawAllButtons(gr) function.


drawAllButtons is just a function called from within on_paint. you can pass gr to any other function you want.

as for your 2nd point, you don't reallly need to think about using GetGraphics. that's only for more complex tasks such as creating images from scratch. for displaying images frin disk or drawing text, using gr.GdiDrawText or gr.DrawImage is more than enough.

Go to the top of the page
+Quote Post
r0k
post May 21 2012, 08:48
Post #1631





Group: Members
Posts: 74
Joined: 8-September 11
Member No.: 93574



Thanks.
OK, i managed to find the original on_paint call. Sometimes it's hard to find where the original call lies when you did not write the script unsure.gif
This also means i can't use those methods outside of an on_paint call to e.g. repaint only one button rather than the whole panel. Is it an issue performance wise or am i again "over-thinking" the issue?

And something totally unrelated to those. Is there a way to update an auto-playlist query (from some jscript code i mean, not with the playlist properties pane) after it was created? Currently i'm removing the auto-playlist and then re-create it but the drawback is that a play-list view showing this auto-playlist won't update correctly and will be left empty.
I guess i could activate the playlist but i don't really like this approach as it tends to interfere with playback.
Go to the top of the page
+Quote Post
marc2003
post May 21 2012, 09:18
Post #1632





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



with more complex panels, it's more efficient to use window.repaintrect() where you can supply x, y, w and h. but for the example buttons scripts, the panels are likely be to be pretty small so it's ok to repaint the whole panel. also, if you look in the code in mouse move sections, the functions exit if nothing has changed. window.repaint only gets called if it needs to be.

and no, it's not to possible to directly edit an existing autoplaylist. removing and re-creating is the way i do it.

QUOTE
but the drawback is that a play-list view showing this auto-playlist won't update correctly and will be left empty


i have no idea what's going on there. it works perfectly fine for me.
Go to the top of the page
+Quote Post
r0k
post May 21 2012, 10:45
Post #1633





Group: Members
Posts: 74
Joined: 8-September 11
Member No.: 93574



QUOTE (marc2003 @ May 21 2012, 10:18) *
with more complex panels, it's more efficient to use window.repaintrect() where you can supply x, y, w and h. but for the example buttons scripts, the panels are likely be to be pretty small so it's ok to repaint the whole panel.

Thanks for pointing this one. It will perfectly fit the toolbar object i'm building to hold buttons.
Well, the example script is just that. I already borrowed/stole the code and put it in a bigger panel, thus my question about performances. smile.gif
QUOTE
QUOTE
but the drawback is that a play-list view showing this auto-playlist won't update correctly and will be left empty

i have no idea what's going on there. it works perfectly fine for me.

I have a Playlist Tab splitter with NG Playlist on it (columns UI as you have guessed). When the tab for my auto-playlist is active, if i remove-create it to change the query, the playlist view is left empty until i switch to another tab and back.
I could probably work this around using two playlists, one normal and one auto but i would prefer to use only one.

There is no method to populate a non auto playlist directly from the library is there? I didn't found a way to get a metaDbHandlesList directly from the library or more precisely, I didn't found a way to select using jscript code items from the library so i can get handles with fb.GetSelections.
I could probably make a temporary autoplaylist to get the handles and then keep the metaDbHandleList object in memory rather than dispose of it after use but i'm not sure how big it can grow huh.gif
Go to the top of the page
+Quote Post
marc2003
post May 21 2012, 19:50
Post #1634





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



if you only have one playlist active and remove/re-create it, then it makes sense to switch focus to it through the script. i can't see why you wouldn't want to do this.
Go to the top of the page
+Quote Post
r0k
post May 22 2012, 10:20
Post #1635





Group: Members
Posts: 74
Joined: 8-September 11
Member No.: 93574



I have several playlists. Some are autoplaylists and others are not. I don't like the idea of activating a playlist through the script because i noticed that when some components activate a playlist, playback will jump to that playlist after the current track finishes even thought there are still tracks on the currently playing playlist. This might have something to do with the obscure playing queue (i wish i could disable it completely) but as i'm not sure why this happens, i prefer not to "activate" playlists at all.
foobar2000 is great but the way playlists interact with each other and with the playing queue is kind of confusing. wacko.gif

That's why i'm (probably over-)cautious about playlist activation. I think i found a way of doing what i have in mind by storing metaHandles in an object. If what i understood of Falstaff coverflow script is right, he's keeping metaHandles in memory for it to work. If those are just what the name suggest, they shouldn't be that big.
Go to the top of the page
+Quote Post
rawny
post May 22 2012, 10:30
Post #1636





Group: Members
Posts: 30
Joined: 27-January 09
Member No.: 66042



You could disable the playback from following the cursor, which would prevent it following the change in playlists. You could either do this manually (via toggling the playback menu -> playback follows cursor) or from your script:

CODE
fb.PlaybackFollowCursor = false;

This could also be combined with having the script to store a reference to the playing playlist when it starts and then making sure that it sets that playlist as the active one once the script finishes everything else it's doing.
Go to the top of the page
+Quote Post
marc2003
post May 22 2012, 10:33
Post #1637





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



QUOTE (r0k @ May 22 2012, 10:20) *
I don't like the idea of activating a playlist through the script because i noticed that when some components activate a playlist, playback will jump to that playlist after the current track finishes even thought there are still tracks on the currently playing playlist.


well that's not right. where playback goes after the current track has finished depends on what playback follows cursor and cursor follows playback settings you have on the main playback menu.

edit: too slow. tongue.gif

This post has been edited by marc2003: May 22 2012, 10:34
Go to the top of the page
+Quote Post
rawny
post May 22 2012, 13:06
Post #1638





Group: Members
Posts: 30
Joined: 27-January 09
Member No.: 66042



Hehe, only just wink.gif
Go to the top of the page
+Quote Post
r0k
post May 22 2012, 19:42
Post #1639





Group: Members
Posts: 74
Joined: 8-September 11
Member No.: 93574



Thanks both. Now i know what those settings do. smile.gif
I always wondered what my mouse cursor had to do with playback yeahright.gif
I have both un-set by default so i guess the issue came from some component or script overwriting them.
Go to the top of the page
+Quote Post
marc2003
post May 23 2012, 05:28
Post #1640





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



samples updated: http://dl.dropbox.com/u/22801321/samples.zip

similar artists has been merged into a new panel which can fetch more feeds. as always, use the mouse wheel to scroll and the text is clickable taking you to pages on the last.fm website...

Go to the top of the page
+Quote Post
San_dr
post May 23 2012, 11:22
Post #1641





Group: Members
Posts: 8
Joined: 4-December 11
Member No.: 95581



Falstaff, VU-meter specifically for your style

http://foobar2000.0pk.ru/viewtopic.php?id=392
Go to the top of the page
+Quote Post
Falstaff
post May 23 2012, 11:44
Post #1642





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



@San_dr

hmm, i'm not conviced by its style ... but thank you wink.gif

take care, you are off topic here, this had to be placed in the VU Meter topic : http://www.hydrogenaudio.org/forums/index....c=33939&hl=



--------------------
http://br3tt.online.fr/
Go to the top of the page
+Quote Post
marc2003
post May 23 2012, 21:58
Post #1643





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



samples updated: http://dl.dropbox.com/u/22801321/samples.zip

new script: musicbrainz releases



i shamelessly stole the idea from romor's recent post in the foo_uie_biography thread. tongue.gif

-like romor's script, it will use MUSICBRAINZ_ARTISTID if it exists in your tags, otherwise it will do a simple text match
-click the text to open the musicbrainz website which will give more details
-unlike romor's script, there is no pagination because i'm lazy. i've countered this slightly by using release-group instead of release so there shouldn't be as many results.

IMPORTANT: existing users of my scripts need to extract the marc2003 folder again.

This post has been edited by marc2003: May 23 2012, 22:02
Go to the top of the page
+Quote Post
Mod-Ular
post May 23 2012, 22:59
Post #1644





Group: Members
Posts: 47
Joined: 17-April 12
Member No.: 98918



Your last update(s) are looking great marc2003. A pitty, i've no time to play with them at the moment. mellow.gif
Been trying to understand the json-file you pull from lastfm in your other scripts as i was planning on constructing something similar. No more need for that now by the looks of it. shifty.gif

I've no scripting skills higher than markuplanguage-abuse (aka. titleformatscript), but i've been reading/digging/gazing trough your scripts for some time now.
I've reached the stage in wich i can tweak some custom visual stuff and update things without crashes... & planning on really learning some jscript whenever i find the motivation (= time) for it. whistling.gif
It would make my foobar much more futureproof for sure.

Great work and a good job on sharing it, thanks. happy.gif
(PS, Always found it a bit tricky to keep track of your 'samples.zip' versions. As they have no version indication at all a.f.a.i.k. I rename 'samples.zip' with a timestamp when i download them which helps a bit.
So last version(s) will be 12-05-22_marc2003_samples. (...and 12-05-23_marc2003_samples, you go fast, lol) Ever considered introducing some kind of versionnumbers?)
Go to the top of the page
+Quote Post
marc2003
post May 24 2012, 05:38
Post #1645





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



QUOTE
Ever considered introducing some kind of versionnumbers?


no. laugh.gif

perhaps i should but i never keep old work. i always overwrite everything thinking newer is better. dropbox keeps backups of recent changes for 30 days so that's enough to restore files if i make catastrophic changes and need to revert.

also:

-update to musicbrainz releases just uploaded. there was a possibility the text would overlap with the date. also changed the scroll step from 1 to 3. oops...
-update to news / reviews / blogs. the main title has been changed to make it consistent with all my other panels where it now follows artist: description

This post has been edited by marc2003: May 24 2012, 06:28
Go to the top of the page
+Quote Post
romor
post May 24 2012, 09:41
Post #1646





Group: Members
Posts: 668
Joined: 16-January 09
Member No.: 65630



QUOTE (marc2003 @ May 23 2012, 22:58) *
i've countered this slightly by using release-group instead of release so there shouldn't be as many results.


Good idea, that is the way to go, I updated my script accordingly wink.gif

Additionally I limit to Album/EP/Single

This post has been edited by romor: May 24 2012, 09:42


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
MDMA
post May 24 2012, 10:00
Post #1647





Group: Members
Posts: 75
Joined: 23-May 10
Member No.: 80861



beer.gif marc2003 awesome new script
Go to the top of the page
+Quote Post
marc2003
post May 24 2012, 10:26
Post #1648





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



QUOTE (romor @ May 24 2012, 09:41) *
Additionally I limit to Album/EP/Single


i've shamelessly stolen that idea also. script updated.

edit: updated again. rolleyes.gif i've now added a toggle on the context menu for 'live' releases which people can turn on or off.

This post has been edited by marc2003: May 24 2012, 10:43
Go to the top of the page
+Quote Post
MDMA
post May 24 2012, 11:53
Post #1649





Group: Members
Posts: 75
Joined: 23-May 10
Member No.: 80861



You're also pretty shameless about admitting your shameless-ness laugh.gif

Does anyone have a track details script? Something with a bit more customisation possibilities than foo_textdisplay. Custom font sizes, colours, etc. Defaultui seems to be lacking in that area, columns has track info mod as well as 'Item Details'

edit: would it be possible to sort the discography? Would be nice to have the releases displaying in date-descending order.

This post has been edited by MDMA: May 24 2012, 12:36
Go to the top of the page
+Quote Post
marc2003
post May 25 2012, 09:30
Post #1650





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



dates are now sorted in reverse order.

http://dl.dropbox.com/u/22801321/samples.zip

Go to the top of the page
+Quote Post

125 Pages V  « < 64 65 66 67 68 > » 
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: 30th July 2014 - 09:16