IPB

Welcome Guest ( Log In | Register )

141 Pages V  « < 101 102 103 104 105 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help
mire777
post Sep 12 2013, 14:15
Post #2551





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



QUOTE (marc2003 @ Sep 12 2013, 15:02) *
CODE
var timer = window.CreateTimerInterval(5000);

function on_timer() {
    a.id++;
    if (a.id > 4) a.id = 0;
    a.metadb_changed();
}


Oh, works great now.. thank you so much Marc ! smile.gif
Go to the top of the page
+Quote Post
derty2
post Sep 12 2013, 18:07
Post #2552





Group: Members
Posts: 585
Joined: 5-June 11
Member No.: 91257



ExtremeHunter

Thankyou for the new script of your Spinning Disc Image Viewer, version 2013-09-12, pasted online here [pastebin.com]

I still have a problem with your edition of the context-menu item Open folder of this disc; it doesn't work exactly as I want.

I performed this action in foobar2000 (with your new script):
QUOTE
Start playing a track whose containing folder is known to contain a target disc image . . . Panel displays the target disc.
Right click the Panel and choose "Open folder of this disc" . . . Explorer opens with target disc selected.
While playback continues, change playlists.
Start playing a track whose containing folder is known to not contain a target disc image . . . Panel displays the default disc.
Right click the Panel and choose "Open folder of this disc" . . . Explorer opens with previous target disc selected !!!!!!!!!!
Stopped playback and restarted foobar2000 (to refresh all).
Start playing the track whose containing folder is known to not contain a target disc image . . . and the Panel displays the default disc.
Right click the Panel and choose "Open folder of this disc" . . . and the context-menu item "Open folder of this disc" is grayed out.

It seems there is some kind of refresh bug.

What I specifically want from the the context-menu item Open folder of this disc is this:
. . . never be grayed out; this context-menu item is always selectable.
. . . if default disc is showing, then Explorer opens with default disc selected.
. . . if target disc is showing, then Explorer opens with target disc selected.

Your code needs to be modified with some kind of IF...ELSE statement for the context-menu item. Can you please have another look. Thanks ++++

_______________________________________________________________

I also enhanced your script with more functionality.
I added this code (read the comments):
CODE
// --- mouse left-click effects.
// --- simulate putting your finger on the turntable platter stopping it from spinning,
// --- and playback pauses until mouse is released.

function on_mouse_lbtn_down(x, y) {
    if (!fb.IsPaused) fb.Pause();
    else return;
}
function on_mouse_lbtn_up(x, y) {
    if (fb.IsPaused) fb.Play();
    else return;
}
function on_mouse_lbtn_dblclk() {
}


_______________________________________________________________

marc2003 - thanks a lot for the code to make the popup message box +++++++

This post has been edited by derty2: Sep 12 2013, 18:26
Go to the top of the page
+Quote Post
ExtremeHunter
post Sep 12 2013, 19:59
Post #2553





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



Sorry I forgot to add default image path before.

It should work now.

pastebin




Go to the top of the page
+Quote Post
derty2
post Sep 13 2013, 00:02
Post #2554





Group: Members
Posts: 585
Joined: 5-June 11
Member No.: 91257



ExtremeHunter, thankyou for the new edit to the script. It has fixed the "Default Disc vs. Target Disc" issue ++++

Unfortunately for me, I noticed another problem with your current script . . .

In my foobar2000 at "Preferences > Display > Album art - Disc (tab)" I have this search pattern:††††disc*[%discnumber%].*
It is only one line; I have no other search patterns for 'Disc'.

My tagging scheme for Vinyl Rips is to use the %discnumber% tag as a reference to the sides ...and to choose a disc image to load.

EXAMPLE 1:
QUOTE
A 1-LP album having 4 tracks:††††2 are on Side-A††|††2 are on Side-B
- The folder containing the tracks will have two disc images: disc-a.jpg,†††disc-b.jpg
- In the %discnumber% Tag of the tracks:
††Track No: 1†††††has value: A
††Track No: 2†††††has value: A
††Track No: 3†††††has value: B
††Track No: 4†††††has value: B

EXAMPLE 2:
QUOTE
A 2-LP album having 8 tracks:††††2 are on Disc-1/Side-A††|††2 are on Disc-1/Side-B††|††2 are on Disc-2/Side-A††|††2 are on Disc-2/Side-B
- The folder containing the tracks will have four disc images: disc-1a.jpg,†††disc-1b.jpg,†††disc-2a.jpg,†††disc-2b.jpg
- In the %discnumber% Tag of the tracks:
††Track No: 1†††††has value: 1A
††Track No: 2†††††has value: 1A
††Track No: 3†††††has value: 1B
††Track No: 4†††††has value: 1B
††Track No: 5†††††has value: 2A
††Track No: 6†††††has value: 2A
††Track No: 7†††††has value: 2B
††Track No: 8†††††has value: 2B

The current script does not take into account my artwork loading preference for disc image, which is conditional on the discnumber tag.
I'm not sure where in your script I can make the appropriate edit.

FYI, I had the same problem with the WSH Vinyl Turntable script by marc2003, and marc helped me to fix it. See this post here...

Thanks +++++

__________________________________________________

One more feature request (if you are going to dig into the code again). . .

I want to add another right-click context menu item named Resize disc to fit the panel
I have no idea what the code is for this. Do you have some code for this please.

Thanks again ++++++

__________________________________________________

* EDIT *

ExtremeHunter, you can ignore the first part of my post (regarding loading multiple disc images for an album) . . . . I fixed it!
I had another read of my discussion with marc2003 and dived into your code myself. The fix was pretty much identical, change one line like this:
QUOTE
old:††††var currentAlbum = fb.TitleFormat("%album%").EvalWithMetadb(metadb);
new:†††var currentAlbum = fb.TitleFormat("%album%%discnumber%").EvalWithMetadb(metadb);


This post has been edited by derty2: Sep 13 2013, 00:37
Go to the top of the page
+Quote Post
ExtremeHunter
post Sep 13 2013, 11:04
Post #2555





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



Added Fit image to context menu.
pastebin
Go to the top of the page
+Quote Post
mire777
post Sep 13 2013, 13:44
Post #2556





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



Marc, i set Auto Cycle Image, i only have one question. How to tell script to skip image if no exist in attached pictures? I want that cycling always be on, and if more image exist then to cycle, if not then to show only front image?
http://pastebin.com/MpAUVKcg

This post has been edited by mire777: Sep 13 2013, 13:54
Go to the top of the page
+Quote Post
marc2003
post Sep 13 2013, 14:42
Post #2557





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



line 350 is this:
CODE
this.img = utils.GetAlbumArtV2(p.metadb, this.id);


insert this after it.
CODE
if (!this.img) {
    this.id++;
    if (this.id > 4) this.id = 0;
    this.metadb_changed();
    return;
}


i see a lot of your global callbacks at the start contain these 2 lines.

CODE
a.metadb_changed();
p.item_focus_change();


you can remove the first line because it gets called as a result of the p.item_focus_change function.

This post has been edited by marc2003: Sep 13 2013, 14:45
Go to the top of the page
+Quote Post
mire777
post Sep 13 2013, 14:56
Post #2558





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



QUOTE (marc2003 @ Sep 13 2013, 15:42) *
line 350 is this:
CODE
this.img = utils.GetAlbumArtV2(p.metadb, this.id);


insert this after it.
CODE
if (!this.img) {
    this.id++;
    if (this.id > 4) this.id = 0;
    this.metadb_changed();
    return;
}


i see a lot of your global callbacks at the start contain these 2 lines.

CODE
a.metadb_changed();
p.item_focus_change();


you can remove the first line because it gets called as a result of the p.item_focus_change function.



ok, i enter this line , but it still cycle image

This post has been edited by mire777: Sep 13 2013, 14:56
Go to the top of the page
+Quote Post
marc2003
post Sep 13 2013, 15:03
Post #2559





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



it cycles images that are present but skips any type that is missing. that's what you asked for? previously it would sit waiting with a blank screen if there wasn't an image for the current type.
Go to the top of the page
+Quote Post
ExtremeHunter
post Sep 13 2013, 15:06
Post #2560





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



mire777

I also improved your timers, they were mess.

pastebin
Go to the top of the page
+Quote Post
mire777
post Sep 13 2013, 15:14
Post #2561





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



QUOTE (marc2003 @ Sep 13 2013, 16:03) *
it cycles images that are present but skips any type that is missing. that's what you asked for? previously it would sit waiting with a blank screen if there wasn't an image for the current type.

oh yes after i clear properties, it work's. Thanks Marc smile.gif
thank's ExtremeHunter i will try how it work smile.gif

This post has been edited by mire777: Sep 13 2013, 15:17
Go to the top of the page
+Quote Post
mire777
post Sep 13 2013, 23:17
Post #2562





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



ExtremeHunter thanks again. I tried your script edit, works much beter than mine. But i was have error ''out of memory'', and foobar crashes if i didn't set ''no artist image'' in preferences..

Also i can't change front,back,icon... manualy from menu.
*EDIT: ok, it can do that because auto cycle is on.

I try to fix this...

This post has been edited by mire777: Sep 13 2013, 23:40
Go to the top of the page
+Quote Post
mire777
post Sep 15 2013, 00:19
Post #2563





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



I edited script, and fix problem.
Thanks Marc and ExtremeHunter for help..
http://pastebin.com/qe9ysR2s
Go to the top of the page
+Quote Post
drm200
post Sep 18 2013, 11:34
Post #2564





Group: Members
Posts: 11
Joined: 8-February 11
Member No.: 88007



I have a problem with display of special characters. The same code results in a different outputs in two different panels.

In the first WSH panel is the following line of code:

gr.DrawString("★", gdi.Font("segoe ui symbol", 17, 1), RGB(250,0,0), 10, 10, ww, wh);

The result is to display the "★" properly.

I now cut and paste the same code into a different WSH panel within the same application. In this panel, the displayed output is completely different:
The result is something like this (as shown between the quotemarks): "‚~..."

What would cause the code to display the star differently in the second panel?





Go to the top of the page
+Quote Post
godrick
post Sep 19 2013, 03:06
Post #2565





Group: Members
Posts: 334
Joined: 31-December 10
Member No.: 86948



marc2003, can't state strongly enough how much I enjoy your scripts. I use your Musicbrainz script quite a bit to understand the releases of artists as I play music, and appreciate the ability to use the primary and secondary filters you've included. It would be great if you could consider adding filters for MB secondary types of "compilation" and "remix" (in addition to the existing filter for the secondary type of "live"). If it's a pain, don't bother, but if straightforward it would be much appreciated.
Go to the top of the page
+Quote Post
marc2003
post Sep 19 2013, 10:02
Post #2566





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



done. just right click>Update script.

full download here: 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
godrick
post Sep 19 2013, 10:53
Post #2567





Group: Members
Posts: 334
Joined: 31-December 10
Member No.: 86948



Thanks - works great!
Go to the top of the page
+Quote Post
mire777
post Sep 23 2013, 16:43
Post #2568





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



I need help..
I played a little with Br3tt Library Search, and add some genre preset, and change the look: http://pastebin.com/twt4qigJ
I love how it works...
The only thing I don't know is how to tell script to search, not only Library but single playlist?
Does anyone know how to do that?
Go to the top of the page
+Quote Post
MordredKLB
post Sep 26 2013, 17:12
Post #2569





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



Hey guys, I'm working on a rather large WSH script which has as an optional feature the lyrics panel that Falstaff wrote 3 years ago. He (and now I) is using the FSO object to open the text files on your computer and then parsing and displaying them. This works great, except for the little problem with Unicode characters. They show up as gibberish on the screen.

Someone asked him about the Unicode issue, and he said it wasn't possible to read them correctly from files. I'm not entirely convinced this is true, because the FSO.OpenTextFile function has an optional 4th parameter, where if you pass -1 you can open the file as Unicode. However, when I do this, it's not just the unicode characters that are gibberish, it's even the ASCII characters. Last file I tried it on had Unicode apostrophe's and when I open it as Unicode, the entire thing shows as Chinese characters for some reason. Has anybody seen this before and figured out how to work around it?
Go to the top of the page
+Quote Post
marc2003
post Sep 26 2013, 18:09
Post #2570





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



i use utils.ReadTextFile(filename).
Go to the top of the page
+Quote Post
MordredKLB
post Sep 26 2013, 20:48
Post #2571





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



QUOTE (marc2003 @ Sep 26 2013, 12:09) *
i use utils.ReadTextFile(filename).

Well that simplifies things quite a bit and I can rip out all the old FSO stuff that Falstaff was originally using (in rereading this thread it seems that at some point he did the same although he never published that code), however I still have the same problem. My .lrc files which have unicode in them are still showing the unicode characters as gibberish:

See for yourself with the following sample .lrc file.

My code essentially looks like this:
fb.trace(utils.ReadTextFile(pathName));

and the first line of lyrics is shown in the console as: [00:19.29]I know what‚€™s going on inside your crooked mind

Obviously I can keep doing what I'm doing, and replace special characters that I know about, but this won't work for lyrics with foreign characters in them which seems extremely bad.

This post has been edited by MordredKLB: Sep 26 2013, 20:55
Go to the top of the page
+Quote Post
marc2003
post Sep 26 2013, 21:21
Post #2572





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



that function takes an optional argument of a codepage...

QUOTE
utils.ReadTextFile(filename, codepage)


there is a codepages.txt file listing them all in the docs folder of the component but i tried the one for your file and it doesn't work

CODE
utils.ReadTextFile(filename, 28605);


it changes slightly but it's still not right.

edit: codebox removed, the forum or browser is mangling what WSH panel mod is displaying. it looks like this...



can you change how the lrc files are saved in the first place? other than that, i have no idea. i'll be honest and say i don't really understand all this codepage stuff because i've never needed it.

This post has been edited by marc2003: Sep 26 2013, 21:25
Go to the top of the page
+Quote Post
MordredKLB
post Sep 26 2013, 21:59
Post #2573





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



QUOTE (marc2003 @ Sep 26 2013, 15:21) *
can you change how the lrc files are saved in the first place? other than that, i have no idea. i'll be honest and say i don't really understand all this codepage stuff because i've never needed it.

Thanks for looking into it.

As far as I know, nothing is happening to the lrc files when they're saved. I just use the lyrics_show_panel3 to download them because I don't have the capability to search and don't want to reinvent the wheel when someone is doing it much better than I could. What I don't get is why the lyrics can load perfectly in every other editor, but not from WSHPanelMod.

This post has been edited by MordredKLB: Sep 26 2013, 21:59
Go to the top of the page
+Quote Post
MordredKLB
post Sep 26 2013, 22:23
Post #2574





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



After further playing around with it, and doing a little light reading, it turns out that the encoding listed is actually wrong. There's also no way to read the codepage from the file. You either have to know it, or you have to guess it using heuristics, which is seemingly what almost everybody does.

Loading that file as UTF-8 (codepage 65001) correctly fixes everything. Of course, that's only useful for 8-bit characters. If I were to get a UTF-16 file (i.e. Japanese lyrics) it would completely barf on them. Not sure what I can do about that. I'll see if things are generally okay with Roman alphabets if I use 65001 for everything.

Edit:
Actually, I'm wrong and stupid. UTF-8 can handle multibyte characters (i.e. Japanese)... that's why they are multibyte in the first place. UTF-16 would be 16-bit wide characters and isn't very common. Since UTF-8 is the web standard, and typically these lyrics are being downloaded from the web I think it's safe to assume that's what they are. I'll test it and make sure, but I think I'm okay now.

This post has been edited by MordredKLB: Sep 26 2013, 22:26
Go to the top of the page
+Quote Post
mire777
post Sep 27 2013, 11:06
Post #2575





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



QUOTE (MordredKLB @ Sep 26 2013, 23:23) *
Actually, I'm wrong and stupid. UTF-8 can handle multibyte characters (i.e. Japanese)... that's why they are multibyte in the first place. UTF-16 would be 16-bit wide characters and isn't very common. Since UTF-8 is the web standard, and typically these lyrics are being downloaded from the web I think it's safe to assume that's what they are. I'll test it and make sure, but I think I'm okay now.


I interested for lyrics script you work, i also edited falstaff lyrics, and add posibility to force save option in lyrics show 3, so you can see lyrics at first play, exactly in same time when it's find from net.. http://mire777.deviantart.com/art/Lyrics-R...h4nge-393946997
Please upload your script when you finish. Thanks..


I found a way to disable WSH script to load on startup and parsing file if their panel is hidden.
This is useful if you have a lot of scripts that are not in use.



You can see that 'Tabed Playlist', 'Album Art' and 'Spinning disc' are initialized in 0 sec.

This can be done simply adding backslash before @import.


//==PREPROCESSOR==
//@name"Tabed Playlist"
///@import"%fb2k_profile_path%scripts\WSH scripts\Tabed Playlist.txt"
//==/PREPROCESSOR==


I think now if posible to make some menu, that can manipulate with this caracter at the beginning, and disable-enable script in panel.
If that menu initialize on startup in 5sec or less it can be useful, because it will consuming less memory than script do on startup..

This post has been edited by mire777: Sep 27 2013, 11:13
Go to the top of the page
+Quote Post

141 Pages V  « < 101 102 103 104 105 > » 
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 19th December 2014 - 00:26