IPB

Welcome Guest ( Log In | Register )

127 Pages V  « < 69 70 71 72 73 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help.
trout
post Jun 19 2012, 15:58
Post #1751





Group: Members
Posts: 424
Joined: 26-March 09
Member No.: 68400




marc2003 - Thanks for your gracious help. Much appreciated!



Go to the top of the page
+Quote Post
onv
post Jun 22 2012, 22:13
Post #1752





Group: Members
Posts: 48
Joined: 23-March 12
Member No.: 98013



@Falstaff

http://www.youtube.com/watch?v=zq8IpyuZZxI&feature=plcp

left button down + move, without scrollbar, for CarPC & other touchscreen's smile.gif

This post has been edited by onv: Jun 22 2012, 22:17
Go to the top of the page
+Quote Post
mjm716
post Jun 23 2012, 10:54
Post #1753





Group: Members
Posts: 155
Joined: 27-May 10
From: EST
Member No.: 80935



Hi Falstaff,

Any chance you can give some help trying to get your WSH playlist script to support 1/2 ratings, similar to $repeat(★,$meta(rating))$if($strchr($meta(rating),.),☆)?

Go to the top of the page
+Quote Post
derty2
post Jul 9 2012, 11:40
Post #1754





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



I have a WSH script which reads and displays a textfile, here is the header description inside the script:
// Draws "<dir_containing_current_audio_file>\folder.txt" in a "WSH Panel Mod" panel,
// or if "folder.txt" is not present, will draw the first text file in that directory,
// or if no text file exists, will draw some default ASCII Art text.



I always use the following template to format the textfile (folder.txt) the same way:
QUOTE
Artist – Album (Date)

<PRODUCT>A line of text is inserted here</PRODUCT/>

<GENRE>A line of text is inserted here</GENRE/>

<OVERVIEW>Multiple lines of text are inserted here
giving informative comments and reviews on the work</OVERVIEW/>

<TRACKS>01. Trackname
02. Trackname
03. Trackname
etc
etc</TRACKS/>

<CREDITS>JOHN SURNAME — guitar
PAUL SURNAME — vocals
GEORGE SURNAME — bass
RINGO SURNAME — drums</CREDITS/>



My script is NEARLY perfect but for one last problem. . .
I want the script to replace the "special words enclosed in angle brackets" with nothing.
That is, I would like the panel to end up displaying like this in foobar2000:
QUOTE
Artist – Album (Date)

A line of text is inserted here

A line of text is inserted here

Multiple lines of text are inserted here
giving informative comments and reviews on the work

01. Trackname
02. Trackname
03. Trackname
etc
etc

JOHN SURNAME — vocals, guitar
PAUL SURNAME — vocals, bass
GEORGE SURNAME — guitar
RINGO SURNAME — drums


I am pretty sure the search-and-replace method needs to be inserted into the function on_paint(gr) section.
I'm not a javascript programmer and I need some help to realize this.
Some help from one of you javascript gurus would be highly appreciated.

P.S. -- I plan on sharing the script here with everyone once it is fully completed and tested.
Go to the top of the page
+Quote Post
marc2003
post Jul 9 2012, 17:09
Post #1755





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



add this to your script (safe mode needs to be disabled) -

CODE
var doc = new ActiveXObject("htmlfile");

function decode(value) {
    try {
        doc.open();
        div = doc.createElement("div");
        div.innerHTML = value.replace(/\n/g, "<br>");
        return div.innerText;
    } catch(e) {
        return "Error reading content.";
    }
}


then assuming the variable mytext contains your text....

CODE
mytext = decode(mytext);


note: you don't need to add the first code section if you're importing common4.js from my scripts.




Go to the top of the page
+Quote Post
derty2
post Jul 9 2012, 20:09
Post #1756





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



Thanks for that reply marc, nice stuff to know. This script is not one of yours.

____________________________________________________________________________________

Anyhow, I just finished composing a reply to my Post #1754. . .so I might as well post it:

I solved it!. . .with a bit of luck and a bit of WWW Google searching with these two terms: (1) jscript replace text, (2) regex escape forward slash.

The relevant function in my script for performing this task is at on_playback_new_track() AND NOT on_paint(gr).

So, looking at an excerpt of the function, we see the code I needed to add (in red):
QUOTE
function on_playback_new_track(){

    g_need_vp_refresh = true;
    g_metadb = get_metadb();

    if (! g_metadb) window.Repaint();

    var new_dir = fb.TitleFormat("$directory_path(%path%)").EvalWithMetadb(g_metadb);
    if (g_dir == new_dir) return;

    var new_title = "";
    var new_text = "";
    var filename = new_dir + "\\folder.txt";
    var filename_contents = utils.ReadTextFile(filename);

    if (new_text == "") {
        var arr = utils.Glob(fb.TitleFormat("$directory_path(%path%)").EvalWithMetadb(g_metadb) + "\\*.txt").toArray();
        if (arr.length > 0) {
            filename = arr[0];
            try {
                these_strings = /<(PRODUCT|\/PRODUCT\/|GENRE|\/GENRE\/|OVERVIEW|\/OVERVIEW\/|TRACKS|\/TRACKS\/|CREDITS|\/CREDITS\/)>/g;
                new_text = filename_contents.replace(these_strings,"");
            } catch(e) {
                new_text = "";
            }
        }
        window.Repaint();
    }

    ...



When I'm finished with it all, I'll share this textfile viewer with everybody.

I have tested just about every textfile viewer script made for WSH Panel Mod
and this one here is UNBELIEVABLE. It is hands down the best I ever found (and modified:-).

Some of its features:
- Looks for your preferred text file name first, else looks for any text file, else displays contents of a default text file (ASCII Art ...see screenshots)
- Pop-out vertical scrollbar on mouse hover
- Up-Down page scroll with left mouse button drag anywhere on the window
- Up-Down page scroll with keyboard arrows/PgDn/PgUp
- Top-Bottom-Top-Bottom infinite chunk scroll with middle mouse clicks
- flat color or gradient color change views
- A thin header bar showing the name of the displayed text file.
- Right click menu: Open folder | Edit text file | Refresh | Configure

Screenshots of the WSH textfile viewer in my foobar2000...(Top shot is reading a text file, Bottom shot is reading "default.txt" aka no text file found):

This post has been edited by derty2: Jul 9 2012, 20:11
Go to the top of the page
+Quote Post
rawny
post Jul 9 2012, 20:31
Post #1757





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



@derty2:

You could simplify your regular expression somewhat based on the fact that the / is repeated:
CODE
these_strings = /<\/?(PRODUCT|GENRE|OVERVIEW|TRACKS|CREDITS)\/?>/g;
? means 0 or 1 occurrences of the character before it, in this case the /

However, it's possible that this might not work unless you group the escaping \ with the / using brackets, as follows:
CODE
these_strings = /<(\/)?(PRODUCT|GENRE|OVERVIEW|TRACKS|CREDITS)(\/)?>/g;

Try it without the grouping first.

Also, is there any reason why your closing tags have / at both ends, i.e.
CODE
</GENRE/>
as opposed to
CODE
</GENRE>
which is the format of closing tags in most mark-up languages such as HTML and XML?
Go to the top of the page
+Quote Post
derty2
post Jul 9 2012, 21:51
Post #1758





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



Thanks for the tips rawny.

The exact same contents of the text file also gets pasted into the %comment% tag field of the audio files.
I use those <special strings with angled brackets> as delimiters to retrieve string sections from the %comment% tag using foobar2000 title-formatting syntax.

I DO NOT use any other audio tags except these:
ARTIST | TRACKTITLE | ALBUM | DATE | GENRE | ALBUM ARTIST | TRACKNUMBER | DISCNUMBER | COMMENT

Therefore, I use the %comment% tag as an extra database containing custom "pseudo-tags" and "values".
The %comment% tag is a standard tag, and can be read by ANY music player.
I can create custom Playlists, Autoplaylists and Library Searches using fb2k title-formatting and selective searching inside the %comment% tag.

Given the %comment% tag and my text file (folder.txt) are the exact mirror of each other, I can extend my user-interface experience into another dimension;
If I accidentally lose the audio tags, the text file is my backup.
If I accidentally lose folder and file names, the text file contents can be read by command-line tools such as FINDSTR.
In a sense, I'm not just playing audio tracks in a music player but cultivating and indexing an audio collection like a professional librarian (from the old days...
...does anybody here remember the index cards in libraries ???)

I use forward slash at both ends of my closing tags because --after much trial and error-- I found retrieval of delimited string sections from the %comment% tag
using fb2k title-formatting syntax gave me more reliable output.

The standard syntax I use in fb2k to retrieve a delimited section of the %comment% tag looks like this example:
$if($strstr(%comment%,<PRODUCT>),$substr(%comment%,$add($strstr(%comment%,<PRODUCT>),$len(<PRODUCT>)),$sub($strstr(%comment%,</PRODUCT/>),1)),)

This post has been edited by derty2: Jul 9 2012, 22:14
Go to the top of the page
+Quote Post
godrick
post Jul 10 2012, 22:54
Post #1759





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



@marc2003, I'm chasing some weird problems on my computer and setup (I have a biography component script that seems identical but behaving differently than others), so with the caveat that I don't know if the following is a result of, cause of, or unrelated to the weirdness:

When using your lastfm - similar artists - top tags - top fans - top albums - top tracks script (which I downloaded per your post #1741), every time I hit "update" in the WSH panel I get the following in the console:

CODE
Last.fm:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>503 Service Unavailable</title>
  </head>
  <body>
    <h1>Error 503 Service Unavailable</h1>
    <p>Service Unavailable</p>
    <h3>Guru Meditation:</h3>
    <p>XID: 564881961</p>
    <hr>
    <p>Varnish cache server</p>
  </body>
</html>


and sometimes I also get in the console:

Last.fm: HTTP error: 12152

I've removed all other scripts and settings related to last.fm other than this script and my last.fm username and API key. When I remove this script I never get these console errors. As far as the display of the WSH panel itself, the panel never crashes and frequently correctly shows the correct data. Sometimes it fails to find similar artists for artists I know last.fm has knowledge of and has previously displayed similar artist info.

Are you seeing this or have you seen this before? Any suggestions? Does it really mean anything? Thanks for any suggestions.

This post has been edited by godrick: Jul 10 2012, 23:06
Go to the top of the page
+Quote Post
marc2003
post Jul 11 2012, 13:35
Post #1760





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



QUOTE
Error 503 Service Unavailable


that one couldn't be more straightforward. it's a problem at last.fm's end and you'll just have to wait for them to fix it. you can check this page....

http://status.last.fm/

Web services is what you need to be looking at. at the time of me posting:



not good... tongue.gif

QUOTE
Last.fm: HTTP error: 12152


this one usually indicates local connectivity problems. i know i've seen it when i have no internet connection. but if your connection is fine, then it could well be linked to the above. you'll just have to wait it out.

This post has been edited by marc2003: Jul 11 2012, 13:39
Go to the top of the page
+Quote Post
godrick
post Jul 11 2012, 22:31
Post #1761





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



Wow - you're right, of course. I guess I win today's genius award for not even considering the possibility of taking the error message literally. Thanks!
Go to the top of the page
+Quote Post
derty2
post Jul 15 2012, 14:45
Post #1762





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



I would like one more bit of help with my 'WSH Textfile Viewer' panel (see Posts: #1754, #1756, #1757, #1758).

I need a Regular Expression pattern to do this:

      If the text file has a line like this:

            <IDX>B-52's, the</IDX/>The B-52's – Wild Planet (1980)

      Then the WSH textfile viewer panel displays like this:

            The B-52's – Wild Planet (1980)

In other words, using regular expression syntax, how do I remove the "<TAGS>" and the string between them ???

In my previous posts, I solved how to remove the "<TAGS>", but this case is trickier.

If any RegEx gurus are reading this, can you show me the regex pattern which solves such a case ?
I have spent hours and hours trying to solve it but I can't !!
Thanks for your help.

Go to the top of the page
+Quote Post
fbuser
post Jul 15 2012, 16:43
Post #1763





Group: Developer
Posts: 683
Joined: 26-September 07
Member No.: 47369



Try something like this (won't work, if the string after </IDX/> contains a ">"):
CODE
"<IDX>B-52's, the</IDX/>The B-52's – Wild Planet (1980)".replace(/(<.+>)(.+)/,"$2")


This post has been edited by fbuser: Jul 15 2012, 16:45
Go to the top of the page
+Quote Post
derty2
post Jul 15 2012, 17:55
Post #1764





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



Thanks for the reply fbuser +++, I will keep your answer for future reference.

I eventually solved it, and the RegEx pattern to do this is quite simple looking: (LEFT_DELIMITER).*(RIGHT_DELIMITER)

What solved it for me was WWW Google searching with this term:  regex remove string between delimiters
which led me to a solution at this webpage:  stackoverflow.com

So, looking at an excerpt of the relevant function in my 'WSH Textfile Viewer' script, we see the code I need (in red):
QUOTE
function on_playback_new_track(){

    g_need_vp_refresh = true;
    g_metadb = get_metadb();

    if (! g_metadb) window.Repaint();

    var new_dir = fb.TitleFormat("$directory_path(%path%)").EvalWithMetadb(g_metadb);
    if (g_dir == new_dir) return;

    var new_title = "";
    var new_text = "";
    var filename = new_dir + "\\folder.txt";
    var filename_contents = utils.ReadTextFile(filename);

    if (new_text == "") {
        var arr = utils.Glob(fb.TitleFormat("$directory_path(%path%)").EvalWithMetadb(g_metadb) + "\\*.txt").toArray();
        if (arr.length > 0) {
            filename = arr[0];
            try {
                these_strings = /(<IDX>).*(<\/IDX\/>)|<PRODUCT>|<\/PRODUCT\/>|<GENRE>|<\/GENRE\/>|<OVERVIEW>|<\/OVERVIEW\/>|<TRACKS>|<\/TRACKS\/>|<CREDITS>|<\/CREDITS\/>/g;
                new_text = filename_contents.replace(these_strings,"");
            } catch(e) {
                new_text = "";
            }
        }
        window.Repaint();
    }

    ...


Before any RegEx gurus comment. . .
Yes, the RegEx pattern for  these_strings = ...;  can be optimized and reduced, but I prefer it like this; a list of definite items.

The main reason I couldn't solve it is because I wasn't using parenthesis correctly while forming my RegEx pattern.

Cheers.

This post has been edited by derty2: Jul 15 2012, 18:21
Go to the top of the page
+Quote Post
rawny
post Jul 16 2012, 04:27
Post #1765





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



QUOTE (derty2 @ Jul 15 2012, 17:55) *
Before any RegEx gurus comment...

Yes, the RegEx pattern for these_strings = ...; can be optimized and reduced, but I prefer it like this; a list of definite items.

You called? tongue.gif

Your current expression won't match things like:
CODE
<PRODUCT>...</PRODUCT/>
It'll only match lines starting with <IDX>, e.g.:
CODE
<IDX>...</PRODUCT/>


This may be more useful:
CODE
these_strings = /(<IDX>|<PRODUCT>|<GENRE>|<OVERVIEW>|<TRACKS>|<CREDITS>).*(<\/IDX\/>|<\/PRODUCT\/>|<\/GENRE\/>|<\/OVERVIEW\/>|<\/TRACKS\/>|<\/CREDITS\/>)/g;


Somewhat simplified:
CODE
these_strings = /<(IDX|PRODUCT|GENRE|OVERVIEW|TRACKS|CREDITS)>.*<\/(IDX|PRODUCT|GENRE|OVERVIEW|TRACKS|CREDITS)\/>/g;


However you'll notice that the list of possible values is repeated unnecessarily. To eliminate this - and the potential nuisance of editing both lists if you ever decide to add/remove a tag - you can use a backreference, like this:
CODE
these_strings = /<(IDX|PRODUCT|GENRE|OVERVIEW|TRACKS|CREDITS)>.*<\/\1\/>/g;

So the \1 is replaced by whatever the first set of brackets in your expression matched ("PRODUCT", "GENRE", "OVERVIEW" etc.). For a better explanation of brackets and backreferencing, check this out: http://www.regular-expressions.info/brackets.html


Alternatively - although perhaps less to your liking as it doesn't involve any kind of definitive list - you could do something along the lines of what fbuser was suggesting and match any set of tags:
CODE
these_strings = /<(.+)>.*<\/\1\/>/g;


This post has been edited by rawny: Jul 16 2012, 04:41
Go to the top of the page
+Quote Post
derty2
post Jul 16 2012, 11:50
Post #1766





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



Thanks a lot for passing on your RegEx knowledge rawny +++++++ Highly informative.

In my case, the only <TAG>string</TAG/> I want fully removed from display is <IDX>string</IDX/> .
For all the other <TAG>string</TAG/> items, I remove the tags but allow the string to be displayed .

I don't have any problems with my "defined items list" RegEx pattern; everything works for me as expected. . .HOWEVER, there is a limitation which I am trying to solve
and if you would like to apply your RegEx skills to this it would help solve the final missing piece of the puzzle.

So far, the RegEx pattern I have will only work on single lines in the text file; it fails when operating over multiple lines.
I am in the process of creating another "fully removed" string section delimited by tags named <CUT> and </CUT/>, look at this example. . .

If we have these lines in the text file:
QUOTE
The Stone Roses were an English rock band formed in Manchester in 1983.
The band were part of<CUT> the declining punk-rock era, but changed their style
over time to alternative/indie rock. They were one of the pioneering groups of
</CUT/> the Madchester movement that was active during the late 1980s and
early 1990s.

Then the WSH Textfile Viewer panel should display this:
QUOTE
The Stone Roses were an English rock band formed in Manchester in 1983.
The band were part of the Madchester movement that was active during the late 1980s and
early 1990s.


BUT. . .as I stated before, the current RegEx pattern has limitations and cannot operate over multiple lines.
Any suggestions on solving this ?

*** EDIT ***

I found a solution. . .at this webpage:  delphifaq.com

This RegEx pattern works correctly:  (<CUT>)(\n|.)*(<\/CUT\/>)

However, if I add a second pair of CUT tags further down the text file then I remove ALL text from the first/highest <CUT> to the last/lowest </CUT/> . . .which is wrong !

This post has been edited by derty2: Jul 16 2012, 12:39
Go to the top of the page
+Quote Post
derty2
post Jul 16 2012, 19:31
Post #1767





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



(continuation of Post #1766)

I solved my problem !!!

This Regular Expression pattern:   (START_DELIMITER)(\n|.)*?(END_DELIMITER)   will match multiple occurrences of the expression as separate instances.

Therefore, in the case of my 'WSH Textfile Viewer' panel and the multiple occurrences of <CUT>string</CUT/> in my text file,
I offer proof-of-concept results from a test run in my foobar2000. . .

Text file contains this text:
QUOTE
The Stone Roses were an English rock band formed in Manchester in 1983.
The band were part of<CUT> the declining punk-rock era, but changed their style
over time to alternative/indie rock. They were one of the pioneering groups of
</CUT/> the Madchester movement that was active during the late 1980s and
early 1990s.

They would often display no interest in<CUT> promoting themselves, and many journalists
were confused, and sometimes angered, when their questions were met with complete silence
from the four Stone</CUT/> Roses.


'WSH Textfile Viewer' displays this text:
QUOTE
The Stone Roses were an English rock band formed in Manchester in 1983.
The band were part of the Madchester movement that was active during the late 1980s and
early 1990s.

They would often display no interest in Roses.


Well. . .that is that; I have all the RegEx I need to control display output in the 'WSH Textfile Viewer' panel .

I hope this was interesting to some of you here, and I will share the 'WSH Textfile Viewer' script and support files with all of you . . .one day soon .

Goodbye and thanks for all the help .

This post has been edited by derty2: Jul 16 2012, 19:45
Go to the top of the page
+Quote Post
marc2003
post Jul 17 2012, 16:19
Post #1768





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



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

last.fm charts: you can now access 1 month charts. (this is a recent addition to the last.fm api)
Go to the top of the page
+Quote Post
r3v0
post Jul 21 2012, 10:24
Post #1769





Group: Members
Posts: 107
Joined: 25-August 08
From: Netherlands
Member No.: 57475



Hi,

I'm currently refining an Album Cover panel which I started years ago.
And after learning so much from this thread and their regular posters,
I'm trying to clean up the mess I made in that code. biggrin.gif

Anyway I wanted to share some pics:







I love album art so I created toggles for showing original art or the remastered version.
Further there are toggles for Gloss, Reflection, Label Icons, Progressbar & text alignment.
Also in the edit mode You can drag the different components (art, text, icon) to your favorite position.
In properties you can change that also and some additional settings.

It's still under construction though.


--------------------
<3 F00
Go to the top of the page
+Quote Post
macarych
post Jul 29 2012, 20:39
Post #1770





Group: Members
Posts: 21
Joined: 25-December 09
From: RF
Member No.: 76336



QUOTE (r3v0 @ Jul 21 2012, 13:24) *
Hi, I'm currently refining an Album Cover panel which I started years ago. .................It's still under construction though.

Very nice ! Do you think to share it ?
Go to the top of the page
+Quote Post
r3v0
post Jul 29 2012, 20:49
Post #1771





Group: Members
Posts: 107
Joined: 25-August 08
From: Netherlands
Member No.: 57475



QUOTE (macarych @ Jul 29 2012, 21:39) *
QUOTE (r3v0 @ Jul 21 2012, 13:24) *
Hi, I'm currently refining an Album Cover panel which I started years ago. .................It's still under construction though.

Very nice ! Do you think to share it ?


When I finish it, maybe.


--------------------
<3 F00
Go to the top of the page
+Quote Post
trout
post Jul 31 2012, 00:14
Post #1772





Group: Members
Posts: 424
Joined: 26-March 09
Member No.: 68400



I have a script for a "Stop After Current" button. I've used gr.DrawLine() to draw an "X" , with the color depending on whether SAC is active. The problem is it does not display correctly when foobar2000 is started. It only draws a small portion of the line drawn top-left to bottom-right, and none of the second line. But - if I bring up the WSH panel config and just click on [Apply] or [OK], then it displays fully as expected.

Here is just the the meat of the script; enough to demonstrate the issue:
CODE
var ww = window.Width;
var wh = window.Height;
function RGB(r,g,b){ return (0xff000000|(r<<16)|(g<<8)|(b)); }

function on_paint(gr) {
    gr.DrawLine(3, 3, ww-4, wh-4, 2, fb.StopAfterCurrent ? RGB(128,128,128) : RGB(188,188,188));
    gr.DrawLine(3, wh-4, ww-4, 3, 2, fb.StopAfterCurrent ? RGB(128,128,128) : RGB(188,188,188)); }
function on_mouse_lbtn_up() {
    fb.RunMainMenuCommand("Playback/Stop After Current");
    window.Repaint(); }
function on_playlist_stop_after_current_changed() {
    window.Repaint(); }

I'm using the most recent WSH Panel Mod (v1.5.3.1) (Inside a Panel Stack Splitter in Columns UI. But I checked it in a Default UI config and the problem was still present). Much appreciation for any feedback on whether it's something I've done wrong (other than drawing an X with lines instead of just using text...), or what the problem is, and how it can be solved.
Go to the top of the page
+Quote Post
rawny
post Jul 31 2012, 03:06
Post #1773





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



@trout:

You need to stick an on_size() function in there to make sure the graphical stuff is (re-)drawn relative to the panel's final size once it has finished whatever sizing calculations it's doing during foobar start-up.

Try replacing the lines defining ww and wh at the top of your code with:
CODE
var ww;
var wh;
    
function on_size() {
    ww = window.Width;
    wh = window.Height;
    window.Repaint();
}

Hope that helps smile.gif

This post has been edited by rawny: Jul 31 2012, 03:08
Go to the top of the page
+Quote Post
trout
post Jul 31 2012, 04:39
Post #1774





Group: Members
Posts: 424
Joined: 26-March 09
Member No.: 68400



rawny,

That's very helpful, thanks!

Go to the top of the page
+Quote Post
Neonphytismo
post Jul 31 2012, 04:56
Post #1775





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



CODE
var ww;
var wh;
    
function on_size() {
    ww = window.Width;
    wh = window.Height;
}


is enough. It's not recommended calling window.Repaint() in on_size() function; might trigger some problems.

see Notes&hints.txt in wsh panel mod package.

QUOTE
3. Don't call repaint functions such as window.Repaint() in callback function on_size() {}, especially in pseudo transparent mode.


--------------------
mad messy misanthropist morbid mused
Go to the top of the page
+Quote Post

127 Pages V  « < 69 70 71 72 73 > » 
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: 2nd October 2014 - 04:41