IPB

Welcome Guest ( Log In | Register )

130 Pages V  « < 50 51 52 53 54 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help
derty2
post Nov 16 2011, 14:35
Post #1276





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



r0lZ, a picture is worth a thousand words...
Screenshot with added comments -->                    
Hey, thanks again for your efforts +++

_________________________________________________________________________

EDIT: I tried the exact same thing in foobar2000 v1.1.7 with WSH Panel Mod 1.5.0 and... you are right, Reflection function no longer works !
Shucks, that's a let down... such a brilliant Artwork Viewer as this should not become abandonware !

__________________________________________________________________________

This post has been edited by derty2: Nov 16 2011, 14:45
Go to the top of the page
+Quote Post
derty2
post Nov 16 2011, 15:59
Post #1277





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



r0lZ, I installed your new version of the WSH Artwork Viewer (v1.1). Here is feedback...

- The script was accepted and the panel updated .

- I cleared the Console, restarted foobar2000, then viewed the Console:
  WSH Panel Mod (WSH Artwork Viewer v1.1 by EIKO, mod by r0lZ): initialized in 8 ms
  No more "obsolete" WSH errors reported !

- I played a track from an album group containing multiple artworks...
  the Artwork Viewer did its thing and auto-scrolled,

    Further enquiry revealed these problems:

    - the "Reflection" function no longer works !

    - If I play a new track, then hover and scroll with my mouse over the Artwork Viewer, WSH Panel Mod crashes:
    WSH Panel Mod: Warning: Obsolete: Please use AppendTo() method to create sub menu instead of AppendMenuItem()
    Error: WSH Panel Mod (WSH Artwork Viewer v1.1 by EIKO, mod by r0lZ): Microsoft JScript runtime error:
    Object doesn't support this property or method
    File: <main>
    Ln: 1173, Col: 3
    <source text only available at compile time>
Go to the top of the page
+Quote Post
r0lZ
post Nov 16 2011, 16:20
Post #1278





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



Read my post above. I know that the reflection doesn't work. But it does not work with the original script either. I don't understand why. Are you sure it works with the script you have uploaded? Do you have another version of the script?

As I've explained in my previous post, the "obsolete" message about AppendTo() is normal. I have not fixed that. (Not sure why that message is only displayed when the panel crashes, but the crash is not related to that point.)

The crash is my fault. I forgot to change a timer (CursorFollowAutoTimer). There are many timers in that script! I have already fixed that bug. I will upload the new version when you will reply to my question about the reflection. If it's possible, I'll try to fix it too.

This post has been edited by r0lZ: Nov 16 2011, 16:23
Go to the top of the page
+Quote Post
derty2
post Nov 16 2011, 19:03
Post #1279





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



r0lZ, continuing the enquiry...

- I exited foobar2000 v1.1.7 (and components: WSH Panel Mod v1.5.0 | WSH Artwork Viewer mod by r0lZ v1.1 )

- I replaced WSH Panel Mod 1.5.0 with version 1.4.3

- I restarted foobar2000 and WSH Artwork Viewer panel is permanently crashed. Refreshing the config does nothing. Console reports this:
   WSH Panel Mod (WSH Artwork Viewer v1.1 by EIKO, mod by r0lZ): initialized in 8 ms
  WSH Panel Mod ({56B397C4-98BA-4D69-A7B2-D58FC88697AB}): initialized in 0 ms
  WSH Panel Mod ({970889CB-C7C8-4B6B-8307-E732076A7340}): initialized in 4 ms
  Error: WSH Panel Mod (WSH Artwork Viewer v1.1 by EIKO, mod by r0lZ): Microsoft JScript runtime error:
  Object doesn't support this property or method
  Ln: 474, Col: 5
  <source text only available at compile time>


- Right-click crashed WSH Artwork Viewer panel > Configure > replaced the code with "WSH Artwork Viewer_original.txt" (from your .7z archive)
  .... everything works fine again
  .... "Reflection" function works
  .... "Hover and scroll with mouse" function works

So, the "original" code inside your .7z package works using WSH Panel Mod v1.4.3. There is no other code; this "old" code is the only code I ever used in this panel.
To try and replicate my "fully working" old panel, here is an export of my "Properties" page for the panel:
"WSH Artwork Viewer_original.properties.wsp" uploaded at filebeam

This post has been edited by derty2: Nov 16 2011, 19:09
Go to the top of the page
+Quote Post
r0lZ
post Nov 16 2011, 19:28
Post #1280





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



Of course, the new version of the script cannot work with WSHPM 1.4, since I use the new methods available only in v1.5.

I would like to know if you can see the reflections with the old version of the script running in WSHPM 1.5. Please test that configuration. Here, I can't get them to work. I think therefore that v1.5 has introduced some kind of incompatibility. But I'm not sure. The problem could be on my side.
Go to the top of the page
+Quote Post
derty2
post Nov 16 2011, 20:21
Post #1281





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



r0lZ, continuing my previous action...

- I am running foobar2000 v1.1.7 (and components: WSH Panel Mod v1.4.3 | WSH Artwork Viewer original script )
  ... everything works as expected, including the "Reflection" function.

- I exit foobar2000, and I replace WSH Panel Mod v1.4.3 with v1.5.0, and I restart foobar2000.
   WSH Panel Mod ({FFF2B498-2C93-4683-9C3B-504C9370EC6B}): initialized in 8 ms
  WSH Panel Mod ({56B397C4-98BA-4D69-A7B2-D58FC88697AB}): initialized in 0 ms
  WSH Panel Mod ({970889CB-C7C8-4B6B-8307-E732076A7340}): initialized in 0 ms
  WSH Panel Mod: Warning: Obsolete: window.CreateTimerInterval() is now obsolete, please use window.SetInterval() in new script.
  WSH Panel Mod: Warning: Obsolete: window.CreateTimerTimeout() is now obsolete, please use window.SetTimeout() in new script.
  WSH Panel Mod: Warning: Obsolete: Please use AppendTo() method to create sub menu instead of AppendMenuItem()


"Reflection" function DOES NOT WORK any more (using "WSH Artwork Viewer original script" and "WSH Panel Mod v1.5.0")
Go to the top of the page
+Quote Post
romka18
post Nov 16 2011, 20:31
Post #1282





Group: Members
Posts: 47
Joined: 30-September 11
Member No.: 94073



i got a question again: maybe its possible to get items names in main menu? for example, i have menu->item 1, item 2... i dont need to get a submenu as popup, i need items. if its possible, i could make a fast dsp switcher as i dreamed.

also, previously i asked about query for transcoding files. i just forget thats windows shell waits until one process will be closed before starting new one. so i think its possible to create some poor script for transcoding.
Go to the top of the page
+Quote Post
r0lZ
post Nov 17 2011, 01:07
Post #1283





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



QUOTE (derty2 @ Nov 16 2011, 21:21) *
"Reflection" function DOES NOT WORK any more (using "WSH Artwork Viewer original script" and "WSH Panel Mod v1.5.0")

OK, same thing here. So, that confirms that there is a bug somewhere in WSHPM 1.5.0 with ApplyMask(). I will try to isolate the problem to demonstrate the bug.

T.P Wang, any idea?
Go to the top of the page
+Quote Post
Neonphytismo
post Nov 17 2011, 03:17
Post #1284





Group: Members
Posts: 73
Joined: 20-April 10
From: YOKOHAMA
Member No.: 80012



About Reflection:
use gr.DrawImage and set the height to a negative integer, you'll find the image has been reflected.


--------------------
mad messy misanthropist morbid mused
Go to the top of the page
+Quote Post
r0lZ
post Nov 17 2011, 08:55
Post #1285





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



QUOTE (Neonphytismo @ Nov 17 2011, 04:17) *
About Reflection:
use gr.DrawImage and set the height to a negative integer, you'll find the image has been reflected.

I know how to turn an image upside down. That part of the script works well. The problem is that the image is fully transparent (or disappears somehow) when a mask is applied.

Here is the code that worked fine in WSHPM 1.4:
CODE
var Mimg = gdi.CreateImage(width, height);
var g = Mimg.GetGraphics();
Rimg = img.Clone(0, 0, img.Width, img.Height);
Rimg.RotateFlip(RotateFlipType.RotateNoneFlipY);
var mask = ReflectionMask.Resize(Rimg.Width, Rimg.Height);    
Rimg.ApplyMask(mask);
g.DrawImage(Rimg, Rimgpos.x, Rimgpos.y, Rimgpos.w, Rimgpos.h, 0, 0, Rimg.Width, Rimg.Height, 0, Opacity);
RawBitmap = Mimg.CreateRawBitmap();

With the code above, nothing is drawn in the RawBitmap!

If I comment out the line Rimg.ApplyMask(mask);, everything works as expected, but of course, the reflection is not "faded out" by the mask.

Also, if I comment out the same line and I replace g.DrawImage(Rimg, ...); with g.DrawImage(mask, ...);, then the gray mask is shown instead of the inverted image.

So, everything is correct, except that ApplyMask() doesn't work. However, it works fine if the image is drawn directly in the panel instead of in the temp bitmap.

Since the code above works perfectly in WSHPM 1.4, my conclusion is that there is a bug in v1.5.

This post has been edited by r0lZ: Nov 17 2011, 08:56
Go to the top of the page
+Quote Post
r0lZ
post Nov 17 2011, 10:36
Post #1286





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



OK, I have isolated the problem. I was wrong. It is not related to the fact that the image is drawn in a bitmap and the bitmap applied to the panel. It seems related to the fact that the image is resized before applying the mask.

I have written a little demo script. (It crashes if you minimize foobar or hide the panel somehow, but that's not the problem. I just wanted to keep the code as simple and short as possible.)

This code works as expected:
CODE
var g_img  = gdi.Image(fb.ProfilePath + "\\wsh_scripts\\samples\\images\\image.jpg");
var g_mask = gdi.Image(fb.ProfilePath + "\\wsh_scripts\\samples\\images\\mask.png");

function on_paint(gr) {
    var ww = window.Width;
    var wh = window.Height;

    var Rimg  = g_img;    // this line is OK
    var Rmask = g_mask.Resize(Rimg.Width, Rimg.Height);
    Rimg.ApplyMask(Rmask);

    gr.DrawImage(Rimg, 0, 0, ww, wh, 0, 0, Rimg.Width, Rimg.Height);
    Rimg.Dispose();
    Rmask.Dispose();
}

Note that the original image is simply copied to the local variable Rimg, then the mask is resized and applied.

This code doesn't work:
CODE
var g_img  = gdi.Image(fb.ProfilePath + "\\wsh_scripts\\samples\\images\\image.jpg");
var g_mask = gdi.Image(fb.ProfilePath + "\\wsh_scripts\\samples\\images\\mask.png");

function on_paint(gr) {
    var ww = window.Width;
    var wh = window.Height;

    var Rimg  = g_img.Resize(ww, wh);    // this line causes the bug!
    var Rmask = g_mask.Resize(Rimg.Width, Rimg.Height);
    Rimg.ApplyMask(Rmask);

    gr.DrawImage(Rimg, 0, 0, ww, wh, 0, 0, Rimg.Width, Rimg.Height);
    Rimg.Dispose();
    Rmask.Dispose();
}

The only difference is that the image is resized when it is placed in the Rimg variable.
If you remove the Rimg.ApplyMask(Rmask); line, the image is correctly drawn, without transparency.
The conclusion is that there is a bug in the ApplyMask() or Resize() method, that makes them incompatible.
That bug was not present in WSHPM v1.4.

T.P. Wang, can you have a look?


This post has been edited by r0lZ: Nov 17 2011, 11:22
Go to the top of the page
+Quote Post
r0lZ
post Nov 17 2011, 11:56
Post #1287





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



QUOTE (derty2 @ Nov 16 2011, 21:21) *
"Reflection" function DOES NOT WORK any more (using "WSH Artwork Viewer original script" and "WSH Panel Mod v1.5.0")

@derty2:

I've found a workaround for the current ApplyMask() bug, so the reflection is visible again. :-) (Technical note: I do the resize after having applied the mask.)

I have also fixed the change I forgot to do in v1.1 and that caused the crashes.

You can download WSH_Artwork_Viewer v1.2 here.

Note that the menus have not been modified (and I don't think I'll do it), so you might still have the warning "Please use AppendTo() method to create sub menu instead of AppendMenuItem()". I'm sure you can live with it! ;-)

Enjoy!

This post has been edited by r0lZ: Nov 17 2011, 12:03
Go to the top of the page
+Quote Post
derty2
post Nov 17 2011, 12:22
Post #1288





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



r0lZ, you are a real champion...
I can't concentrate real hard right now, my eyes are welling up.
My cat Astro... I had him put down and I can't concentrate.
He liked coming into my room and listening to music with me; I feel a bit lost.
Thanks.
Go to the top of the page
+Quote Post
r0lZ
post Nov 17 2011, 13:08
Post #1289





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



QUOTE (derty2 @ Nov 17 2011, 13:22) *
r0lZ, you are a real champion...
I can't concentrate real hard right now, my eyes are welling up.
My cat Astro... I had him put down and I can't concentrate.
He liked coming into my room and listening to music with me; I feel a bit lost.
Thanks.

I'm really sorry, man. I have a cat too, and I understand.

BTW, the ApplyMask() bug has been confirmed by T.P Wang, and will be fixed soon...
Go to the top of the page
+Quote Post
mastema
post Nov 19 2011, 17:30
Post #1290





Group: Members
Posts: 29
Joined: 29-July 08
Member No.: 56449



Hey all! I have a question about Marc's Web Links panel.

I'm trying to align 4 buttons relative to window.Width on the X-axis so they would remain centred on resize, but nothing I tried was successful:

Try #1:
I tried entering ww directly in their X coordinate:
QUOTE
but1: new Button(ww/2-bw*2,.....
but2: new Button(ww/2-bw,.....
but3: new Button(ww/2+bw,.....
but4: new Button(ww/2+bw*2,.....
etc.


Try #2:
define var left_margin as ww and then positioning from there:
QUOTE
var left_margin=ww/2


Try #3:
Similarly to the one above, I tried to use a flag to center the whole thing and then position them as
QUOTE
but1: new Button(-(bw*2),.....
but2: new Button(-bw,.....
but3: new Button(bw,.....

but I haven't yet managed to find the correct flag to use for them.

Could anyone help?

This post has been edited by mastema: Nov 19 2011, 17:56
Go to the top of the page
+Quote Post
marc2003
post Nov 19 2011, 18:28
Post #1291





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



change your on_size function to this...

CODE
function on_size() {
    ww = window.Width;
    wh = window.Height;
    left_margin = Math.round((ww - (bw * 4)) / 2); //4 is the number of buttons.
    on_metadb_changed();
}


you shouldn't need to edit the x value where the buttons are defined except for any new buttons you've added.
Go to the top of the page
+Quote Post
Emerelle
post Nov 19 2011, 18:43
Post #1292





Group: Members
Posts: 142
Joined: 3-November 11
Member No.: 94918



(OT so pls ignore me....)
Derty; Im also very sorry - I have 3 cats sad.gif That pain tears your heart out, awful.
Go to the top of the page
+Quote Post
mastema
post Nov 19 2011, 19:14
Post #1293





Group: Members
Posts: 29
Joined: 29-July 08
Member No.: 56449



Brilliant, Marc, thanks! smile.gif
Go to the top of the page
+Quote Post
romka18
post Dec 1 2011, 13:07
Post #1294





Group: Members
Posts: 47
Joined: 30-September 11
Member No.: 94073



nobody can help me?

if thing i asking before is impossible, can i call a part of main menu? for example, i need only possible methods of sort from "Edit/Sort" menu

thanks in advance

p.s. sorry for my english - i`m from russia, our biggest foobar forum isnt exist anymore, so i rely on your help
Go to the top of the page
+Quote Post
marc2003
post Dec 1 2011, 13:48
Post #1295





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



that's not possible.
Go to the top of the page
+Quote Post
romka18
post Dec 4 2011, 14:05
Post #1296





Group: Members
Posts: 47
Joined: 30-September 11
Member No.: 94073



very sad. but i got a new idea: maybe its possible to read core.cfg with cmd.exe? find the string with dsp names (i saw them, there a string with them separeted by commas). but i havent imagination how to read these files throu cmd. could anybody help?
Go to the top of the page
+Quote Post
suaff
post Dec 4 2011, 15:00
Post #1297





Group: Members
Posts: 23
Joined: 5-December 05
Member No.: 26220



I've got a question: Is it possible to change groups and columns in SimPlaylist or default playlist (DUI) after switch to another playlist? Is it possible to change size of columns?

Thanks a lot


--------------------
foo foo foo
Go to the top of the page
+Quote Post
marc2003
post Dec 4 2011, 17:05
Post #1298





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



@romka18, not possible
@suaff, it looks like you're in the wrong thread

Go to the top of the page
+Quote Post
suaff
post Dec 4 2011, 17:25
Post #1299





Group: Members
Posts: 23
Joined: 5-December 05
Member No.: 26220



QUOTE (marc2003 @ Dec 4 2011, 10:05) *
@suaff, it looks like you're in the wrong thread

This is thread about scripts for WSH Panel Mod? Is it possible to write script for WSH Panel Mod plugin to change group/columns in playlist after switch to another playlist? (SimPlaylist or default playlist)


--------------------
foo foo foo
Go to the top of the page
+Quote Post
marc2003
post Dec 4 2011, 17:27
Post #1300





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



in that case, no.

the only way you can interact with other components is through main menu or playlist context menu commands (plus the documented core functions).

This post has been edited by marc2003: Dec 4 2011, 17:54
Go to the top of the page
+Quote Post

130 Pages V  « < 50 51 52 53 54 > » 
Reply to this topicStart new topic
3 User(s) are reading this topic (2 Guests and 1 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st October 2014 - 22:38