Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WSH Panel Mod script discussion/help (Read 1376135 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WSH Panel Mod script discussion/help

Reply #1375
I always wonder what these strange readme files' purpose was...   

Thanks a lot. Awesome.

 

WSH Panel Mod script discussion/help

Reply #1376
Is there a way to use similar artists panel to add artists that are in my collection to my playlist?

WSH Panel Mod script discussion/help

Reply #1377
To extent this question:

Is it possible to use the main menu command "Quicksearch" and send a parameter or query to use in this quicksearch?

I think we both have the same aim: To find e.g. similar artists (or most played albums or tracks from last.fm charts, etc.) in our libraries.

WSH Panel Mod script discussion/help

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

similar artists now has a 3rd option under links and that is to create an autoplaylist based on the artist name.



(edit: if your preference was for last.fm radio with the old script, this will get reset back to spotify as i had to change the way settings are stored. this only happens once. your setting should stick after that.)

WSH Panel Mod script discussion/help

Reply #1379
similar artists now has a 3rd option under links and that is to create an autoplaylist based on the artist name.

I really like this function. I will try to change it so that it is the text that creates the autoplaylist, and make an assigned playlist for this instead of a new for every artist.

Another idea I got, but that I don't think I'm able to do myself, is a panel with the same layout as "lastfm charts", but with the artist charts instead, and with the same autoplaylist-functionality. Then you could easily see what the most popular tracks are by a certain artist, and play them if they are in your library.

WSH Panel Mod script discussion/help

Reply #1380
you can't edit an existing autoplaylist but if you have a set name, you can loop through all playlists and delete it if the name matches before creating a new one.

on line 187, replace this....
Code: [Select]
        case link == "auto" && in_range && x > 6 && x < 26:
            fb.CreateAutoPlaylist(fb.PlaylistCount, artists[index].name, "artist HAS " + artists[index].name);
            fb.ActivePlaylist = fb.PlaylistCount - 1;
            break;


with

Code: [Select]
        case link == "auto" && in_range && x > 6 && x < 26:
            playlist_name = "similar";
            i = 0;
            while(i < fb.PlaylistCount) {
                if (fb.GetPlaylistName(i) == playlist_name) fb.RemovePlaylist(i);
                else i++;
            }
            fb.CreateAutoPlaylist(fb.PlaylistCount, playlist_name, "artist HAS " + artists[index].name);
            fb.ActivePlaylist = fb.PlaylistCount - 1;
            break;


WSH Panel Mod script discussion/help

Reply #1381
Thanks! Works a charm, and as usual, I realise I wouldn't be able to do that myself...

I think some of your other scripts would benefit from having similar functions... External links are nice, but I find it's even nicer to be able to browse my own library using information that's taken from for instance last.fm.

WSH Panel Mod script discussion/help

Reply #1382
the reason i only put last.fm/spotify links on my scripts was to help me easily find new stuff to listen to. i'd find using it to locate music i already have a bit redundant - but maybe that is because my collection is so tiny.

WSH Panel Mod script discussion/help

Reply #1383
Many , many Thanks !!! This is exactly what I wanted....

WSH Panel Mod script discussion/help

Reply #1384
Hello everyone, I modified Mar2003's similar artist script to display top artist tracks instead. I'm not familiar with scripting but I took a look at the script's code and last.fm api and figured it out.
This is the code in the modified lines:

Line 102
Code: [Select]
    filename = folder + "\\toptracks.json";

Line 110
Code: [Select]
        else if (typeof parsed_data.toptracks.track == "object") artists = parsed_data.toptracks.track;

Line 120
Code: [Select]
    lastfm("&method=artist.gettoptracks&artist=" + encodeURIComponent(artist), "foo_wsh_lastfm_toptracks", function() { save(xmlhttp.responsetext, fn); load(); });

Line 9
Code: [Select]
var script_name = "Top Tracks";


I've been using this for almost 2 weeks with no issues other than the last.fm/spotify search links not working, I'm not familiar with regular expressions...

If I may ask, some questions regarding excellent Marc's scripts:
1- how can I use a complex titleformatting string for defining the path and name of the stored scripts data; json files for both biography view and similar artist?
2- how can I display the number of listeners before the artist name.

I also noted that while playing mp4 files the last.fm panels crashed, and when setting a very long string in the remapping artist field option of the bio script, it gets trimmed. I worked-around it by adding the setting directly in the properties panel dialog.

Similar to Motorhorst, I thought if it was possible to add a search button for the displayed artist to run a query in the media library search component, is it possible or not tooo tricky? I've used the similar artist panel to discover new music as well though unlucky for me, it always reports that is unable to open the default browser, which means that I have to type everytime the search url /name of the artist in last.fm for each artist. If is not too much to ask perhaps just like in the biography panel, there could be an option to copy the artist names to clipboard, which would save me some steps 

WSH Panel Mod script discussion/help

Reply #1385
Hello everyone, I modified Mar2003's similar artist script to display top artist tracks instead. I'm not familiar with scripting but I took a look at the script's code and last.fm api and figured it out.
This is the code in the modified lines:

Line 102
Code: [Select]
    filename = folder + "\\toptracks.json";

Line 110
Code: [Select]
        else if (typeof parsed_data.toptracks.track == "object") artists = parsed_data.toptracks.track;

Line 120
Code: [Select]
    lastfm("&method=artist.gettoptracks&artist=" + encodeURIComponent(artist), "foo_wsh_lastfm_toptracks", function() { save(xmlhttp.responsetext, fn); load(); });

Line 9
Code: [Select]
var script_name = "Top Tracks";


I've been using this for almost 2 weeks with no issues other than the last.fm/spotify search links not working, I'm not familiar with regular expressions...

If I may ask, some questions regarding excellent Marc's scripts:
1- how can I use a complex titleformatting string for defining the path and name of the stored scripts data; json files for both biography view and similar artist?
2- how can I display the number of listeners before the artist name.

I also noted that while playing mp4 files the last.fm panels crashed, and when setting a very long string in the remapping artist field option of the bio script, it gets trimmed. I worked-around it by adding the setting directly in the properties panel dialog.

Similar to Motorhorst, I thought if it was possible to add a search button for the displayed artist to run a query in the media library search component, is it possible or not tooo tricky? I've used the similar artist panel to discover new music as well though unlucky for me, it always reports that is unable to open the default browser, which means that I have to type everytime the search url /name of the artist in last.fm for each artist. If is not too much to ask perhaps just like in the biography panel, there could be an option to copy the artist names to clipboard, which would save me some steps 


Also I modified this script, I removed the button spotify, last.fm, auto playlist

Code: [Select]
// ==PREPROCESSOR==
// @import "%fb2k_profile_path%marc2003\common4.js"
// @name "Top Tracks"
// @author "marc2003"
// @feature "v1.0"
// @feature "watch-metadb"
// ==/PREPROCESSOR==

var script_name = "Top Tracks";
var username_file = settings_path + "username";
var username = read(username_file);
var api_key_file = settings_path + "api_key";
var api_key = read(api_key_file);
var lfm_img = gdi.Image(images_path + "lastfm_red_small.gif");
var spotify_img = gdi.Image(images_path + "spotify.png");
var lastfm_play_img = gdi.Image(images_path + "lastfm_play.png");
var auto_img = gdi.Image(images_path + "search_small.png");
var lastfm_small_img = gdi.Image(images_path + "lastfm small.png");
var up_img = gdi.Image(images_path + "up.png");
var down_img = gdi.Image(images_path + "down.png");
var but_x = 0;
var offset = 0;
var rows = 0;
var artist = "";
var folder = "";
var g_text = "";
var artists = [];
var g_tooltip = window.CreateTooltip();
var link = window.GetProperty("link", "spotify");
var show_artist = window.GetProperty("show_artist", true);
var pause = window.GetProperty("pause", true);

on_item_focus_change();

function on_notify_data(name, data) {
    if (name == "lastfm_update" && data == 1) {
        username = read(username_file);
        api_key = read(api_key_file);
        artist = Date();
        on_item_focus_change();
    }
}

function on_size() {
    ww = window.Width;
    wh = window.Height;
    but_x = Math.round((ww - 15) / 2);
    offset = 0;
    rows = Math.floor((wh - 58) / 20);
    up_btn = new sb(but_x, 32, 15, 15, up_img, "offset > 0", function () { on_mouse_wheel(1); });
    down_btn = new sb(but_x, wh - 15, 15, 15, down_img, "offset < artists.length - rows", function () { on_mouse_wheel(-1); });
}

function on_paint(gr) {
    gr.FillSolidRect(0, 0, ww, wh, g_backcolor);
    switch(true) {
        case username.length == 0:
        case api_key.length != 32:
            gr.GdiDrawText("Please use the context menu to set your Last.fm username and API KEY.", normal_font, g_textcolor, 10, 0, ww - 20, wh, DT_VCENTER | DT_CENTER | DT_WORDBREAK | DT_CALCRECT | DT_NOPREFIX);
            break;
        case !g_metadb:
            gr.GdiDrawText("[no selection]", normal_font, g_textcolor, 0, 0, ww, wh, DT_VCENTER | DT_CENTER | DT_WORDBREAK | DT_CALCRECT | DT_NOPREFIX);
            break;
        default:
            gr.GdiDrawText(script_name + (show_artist ? " to " + artist : ""), title_font, g_textcolor_hl, 6, 6, ww - 77, 24, DT_VCENTER | DT_END_ELLIPSIS | DT_CALCRECT | DT_NOPREFIX);
            gr.DrawImage(lfm_img, ww - 60, 8, 50, 18, 0, 0, 50, 18);
            gr.DrawLine(5, 29, ww - 10, 29, 1, g_textcolor_hl);
            if (artists.length == 0) {
                gr.GdiDrawText("[no data]", normal_font, g_textcolor, 0, 0, ww, wh, DT_VCENTER | DT_CENTER | DT_WORDBREAK | DT_CALCRECT | DT_NOPREFIX);
            } else {
                for (l = 0; l < Math.min(rows, artists.length); l++) {
                    gr.DrawImage(lastfm_small_img, 5, 45 + (l * 20), 20, 20, 0, 0, 20, 20);
                    gr.GdiDrawText(artists[l + offset].name, list_font, g_textcolor, 30, 46 + (l * 20), ww - 66, 18, DT_VCENTER | DT_END_ELLIPSIS | DT_CALCRECT | DT_NOPREFIX);
                }
                up_btn.draw(gr);
                down_btn.draw(gr);
            }
    }
}

function on_playback_new_track() {
    on_item_focus_change();
}

function on_playback_dynamic_info_track() {
    on_item_focus_change();
}

function on_playback_stop() {
    on_item_focus_change();
}

function on_metadb_changed() {
    if (!g_metadb) return;
    my_metadb_changed("%artist%", function() { load(); });
}

function load() {
    artists = [];
    offset = 0;
    if (!fso.FolderExists(folder)) fso.CreateFolder(folder);
    filename = folder + "\\toptracks.json";
    if (fso.fileExists(filename)) {
        file = fso.Getfile(filename);
        ts = fso.OpenTextFile(filename, 1, false, -1);
        g_text = ts.ReadAll();
        ts.close();
        parsed_data = JSON.parse(g_text);
        if (parsed_data.error > 0) fb.trace(script_name + ": " + g_text);
        else if (typeof parsed_data.toptracks.track == "object") artists = parsed_data.toptracks.track;
        if (Date.parse(Date()) - Date.parse(file.DateLastModified) > 86400000) get();
    } else {
        get();
    }
    window.Repaint();
}

function get() {
    var fn = filename;
    lastfm("&method=artist.gettoptracks&artist=" + encodeURIComponent(artist), "foo_wsh_lastfm_toptracks", function() { save(xmlhttp.responsetext, fn); load(); });
}

function on_mouse_wheel(delta) {
    if (artists.length < rows) return;
    offset -= delta * 3;
    if (offset < 0) offset = 0;
    if (rows + offset > artists.length) offset = artists.length - rows;
    window.Repaint();
}

function on_mouse_move(x, y) {
    index = Math.floor((y - 45 ) / 20) + offset;
    in_range = index >= offset && index < Math.min(offset + rows, artists.length);
    switch(true) {
        case !g_metadb:
        case username.length == 0:
        case api_key.length != 32:
            return;

        case in_range && x > 5 && x < 25:
            var url = (artists[index].url.indexOf("www.") == 0 ? "http://" : "") + artists[index].url;
            tt(url);
            window.SetCursor(IDC_HAND);
            break;
        case up_btn.trace(x, y):
        case down_btn.trace(x, y):
            window.SetCursor(IDC_HAND);
            break;
        default:
            window.SetCursor(IDC_ARROW);
            g_tooltip.Text = "";
            g_tooltip.Deactivate();
            break;
    }
}

function on_mouse_lbtn_up(x, y) {
    switch(true) {
        case !g_metadb:
        case username.length == 0:
        case api_key.length != 32:
            return;

        case in_range && x > 5 && x < 25:
            try { WshShell.run(artists[index].url); } catch(e) { MsgBox("Unable to launch your default browser.", 0, script_name); }
            break;
        case up_btn.trace(x, y):
            up_btn.click(x, y);
            break;
        case down_btn.trace(x, y):
            down_btn.click(x, y);
            break;
    }
}

function on_mouse_rbtn_up(x, y) {
    var _menu = window.CreatePopupMenu();
    var _links = window.CreatePopupMenu();
    var _selection = window.CreatePopupMenu();
    var idx;
    _menu.AppendMenuItem(username.length > 0 && api_key.length == 32 && g_metadb ? MF_STRING : MF_GRAYED, 1, "Update");
    _menu.AppendMenuSeparator();
    _menu.AppendMenuItem(MF_STRING, 11, "Show artist name in heading");
    _menu.CheckMenuItem(11, show_artist);
    _menu.AppendMenuSeparator();
    _menu.AppendMenuItem(link == "spotify" ? MF_STRING : MF_GRAYED, 7, "Pause playback when launching Spotify");
    _menu.CheckMenuItem(7, pause);
    _menu.AppendMenuSeparator();
    _links.AppendMenuItem(MF_STRING, 4, "Spotify");
    _links.AppendMenuItem(MF_STRING, 5, "Last.fm radio");
    _links.AppendMenuItem(MF_STRING, 6, "Autoplaylist");
    _links.CheckMenuRadioItem(4, 6, link == "spotify" ? 4 : link == "lastfm" ? 5 : 6);
    _links.AppendTo(_menu, MF_STRING, "Links");
    _menu.AppendMenuSeparator();
    _selection.AppendMenuItem(MF_STRING, 900, "Use display preferences");
    _selection.AppendMenuItem(MF_STRING, 901, "Prefer now playing");
    _selection.AppendMenuItem(MF_STRING, 902, "Follow selected track");
    _selection.CheckMenuRadioItem(900, 903, selection_mode + 900);
    _selection.AppendTo(_menu, MF_STRING, "Selection mode");
    _menu.AppendMenuSeparator();
    _menu.AppendMenuItem(MF_STRING, 2, "Set your Last.fm username...");
    _menu.AppendMenuItem(MF_STRING, 3, "Set your API KEY...");
    _menu.AppendMenuSeparator();
    if (utils.IsKeyPressed(0x10)) _menu.AppendMenuItem(MF_STRING, 9, "Properties");
    _menu.AppendMenuItem(MF_STRING, 10, "Configure...");
    idx = _menu.TrackPopupMenu(x, y);
    switch(idx) {
        case 1:
            get();
            break;
        case 2:
            set_username();
            artist = Date();
            on_item_focus_change();
            break;
        case 3:
            set_api_key();
            artist = Date();
            on_item_focus_change();
            break;
        case 4:
        case 5:
        case 6:
            link = idx == 4 ? "spotify" : idx == 5 ? "lastfm" : "auto";
            window.SetProperty("link", link);
            window.Repaint();
            break;
        case 11:
            show_artist = !show_artist;
            window.SetProperty("show_artist", show_artist);
            window.Repaint();
            break;
        case 7:
            pause = !pause;
            window.SetProperty("pause", pause);
            break;
        case 9:
            window.ShowProperties();
            break;
        case 10:
            window.ShowConfigure();
            break;
        case 900:
        case 901:
        case 902:
            selection_mode = idx - 900;
            window.SetProperty("selection_mode", selection_mode);
            on_item_focus_change();
            break;
    }
    _selection.Dispose();
    _menu.Dispose();
    _links.Dispose();
    return true;
}


WSH Panel Mod script discussion/help

Reply #1386
the reason i only put last.fm/spotify links on my scripts was to help me easily find new stuff to listen to. i'd find using it to locate music i already have a bit redundant - but maybe that is because my collection is so tiny.


Possibly  My library is quite large and can be hard to browse sometimes, and for me it's more often "what should I listen to now" than "what should I get to listen to later". So the info is great for me in cases where there are connections between artists/tracks that are not apparent through the %tags%, but my lazy side wants to be able to directly browse the library by clicking this info...

We will never be able to use commands like "quicksearch for same..." or soft playlists in these lists right? It would be great to get a list of all popular tags for a specific song, and then click on one to create a playlist with other songs in the library with the same tag.

WSH Panel Mod script discussion/help

Reply #1387
Ok, the silence is deafening. In my newbiness I looked into the common file.js it seems that here I should change the folder where the data is stored. The $CRC32 string may account for the folder names while the var data_folder line for the parent folder wsh_lastfm.
I've attempted using "fb.TitleFormat("")" strings for a custom path, it returns error in the console.
Edit: In the last.fm scripts there's "var folder = "";" line, attempted as well to add title formatting syntax.

Edit2: @gxavz1 I guess that's a way to fix it or the spartan version!

WSH Panel Mod script discussion/help

Reply #1388
So far what I've got trying to display the number of listeners

Code: [Select]
var artists = [];
var listeners = [];


Line 111
Code: [Select]
        else if (typeof parsed_data.toptracks.track == "object") artists = parsed_data.toptracks.track;
        listeners = parsed_data.toptracks.listeners;


What I haven't figured out yet is how to append the listeners value to the beginning of the artist value.

WSH Panel Mod script discussion/help

Reply #1389
why do you care where the cached file is saved? it's not like any it has any use for anything else. the best place for it is under one subfolder in your foobar profile. if you really feel the need to change the path, you need to make sure the folders exist first.

as for trying to access listener data, you need to see if the toptracks feed even contains it. i recommend using notepad++ and the jsmin plugin. this allows you to make JSON files readable. when you open a JSON file, it's just a single line of text but pressing ctrl+alt+m expands it so you can see how it's structured like this.....





WSH Panel Mod script discussion/help

Reply #1390
I prefer to keep artist/album related info into it's artist/album directory, in the same way I store album art, cue and log files. Tracks from artists/albums that are organized in a defined directory structure will already have existing directories, in case a track whos artist/album is not present, can't a directory be created using the same scheme? via titleformatting anyone can adequate their script to match their music structure, if desired.

It does contain it (in the whole feed duh, not in the node, thanks for the hint!), quite cool and useful plugin to view the data structure. Looking at the screenshot and the listeners data tree looks like parsed_data.toptracks.tracks.listeners Anyway I'll take a second look with the plugin.

WSH Panel Mod script discussion/help

Reply #1391
of course you'd keep cue/log files in your own organised structure because they actually are of some use to you and once created they (usually) don't change.

but outside of these panels, these JSON files serve no purpose at all. remember they are only temporary -they get updated if more than 24 hours old. there simply is no reason to store these files alongside your music.

if you really must persist then you need to look at using the FolderExists and CreateFolder jscript functions. there are examples in the script already. also, if a folder doesn't exist, you can't create it unless the parent folder exists so you need to check the existence of that and so on.

WSH Panel Mod script discussion/help

Reply #1392
I guess it comes down to some work philosophy, I prefer to work whenever possible with offline files & data. Even if they are updated regulary I know I have a copy in case something unlikely happens, or I can no longer access the service, etc. That gives more freedom to do/use that data in other forms too. Sometimes month happens till I get an idea/use for some data I have been keeping a record of. Overall, I grant you the point that is a crazy philosophy, but for me it pays off in sometimes very unexpected ways.

Now I started using Notepad++ with the java language view for the scripts, the biography script shows listener's data along with some other, but the code is quite different. I'm not feeling that I'm doing some huge progress but anyways... Hum in other words it has to recursively check the directories. So it seems that the place I should insert the custom title formatting string is in the line 406 in common.js, after line 407 I should check if the folder exists (that includes if the folder didn't exist but it was successfully created). In the case it didn't exist and it wasn't created, create a folder using the same custom path but with one upper directory level. Repeat this process. And there's the folder name specified in the lines 72 and 81, maybe I can just strip it to the data folder var.

WSH Panel Mod script discussion/help

Reply #1393
I would like to send one ore more files to an external application.
I do this with foo_run like this...

Label: Mp3 Tag File (for the active file only one)
Path: "E:\MiniFoo\Applications\Mp3tag\Mp3tagPortable.exe" "%path%"

and...

Label: Mp3 Tag Folder (for the active folder)
Path: "E:\MiniFoo\Applications\Mp3tag\Mp3tagPortable.exe" "$substr(%_path%,0,$strrchr(%_path%,'\'))"

I want to make this only with WHS Pannel and no longer with foo_run.
I tested many variations in my WHS Script (Pop Up Menue) but nothing is working propper...

case 1:

try {WshShell.Run("\"" + (fb.FoobarPath + "themes\\" +name+ "\\Applications\\Mp3tag\\Mp3tagPortable.exe") + "\"");} catch (e)
try {WshShell.Run("\"" + (fb.FoobarPath + "themes\\" +name+ "\\Applications\\Mp3tag\\Mp3tagPortable.exe") + fb.TitleFormat("%_path%"));} catch (e)
try {WshShell.Run("\"" + (fb.FoobarPath + "themes\\" +name+ "\\Applications\\Mp3tag\\Mp3tagPortable.exe") + fb.TitleFormat("$directory(%path%,2)"));} catch (e)
try {WshShell.Run(fb.FoobarPath + "themes\\" +name+ "\\Applications\\Mp3tag\\Mp3tagPortable.exe");} catch (e)
try {WshShell.Run("\"" + (fb.FoobarPath + "themes\\" +name+ "\\Applications\\Mp3tag\\Mp3tagPortable.exe") + fb.TitleFormat("%path%"));} catch (e)
try {WshShell.Run("E:\MiniFoo\minifoo8\themes\TURBO\Applications\Mp3tag\Mp3tagPortable.exe");} catch (e)
try {WshShell.run("E:\\MiniFoo\\minifoo8\\themes\\TURBO\\Applications\\Mp3tag\\Mp3tagPortable.exe" + fb.TitleFormat("%path%").Eval(true));} catch (e) {};
try {WshShell.run("E:\\MiniFoo\\minifoo8\\themes\\TURBO\\Applications\\Mp3tag\\Mp3tagPortable.exe" + fb.TitleFormat("%path%"));} catch (e) {};

break;

Any Idea??

WSH Panel Mod script discussion/help

Reply #1394
Hi,

Here is a first sharing of my new WSH playlist viewer v2, just for testing and have some feedback about performances and possible issues (that explain the packed version for now)
This new version is optimized compare to my previous one and has a behaviour pretty close of a classic playlist viewer now. Note that group header are now well handled

get script here: http://pastebin.com/BQWjjYqM

then paste it in a WSH panel Mod panel (version 1.5.2 minimum is required)



use jscript and not jscript9 engine

WSH Panel Mod script discussion/help

Reply #1395
to Falstaff
can you describe what have you do for optimization?

where in this script anything about playlist?

WSH Panel Mod script discussion/help

Reply #1396
to Falstaff
can you describe what have you do for optimization?

where in this script anything about playlist?


script is packed because i want to finish it before publish it. optimization are everywhere, i've started from scratch the playlist populate, i can't describe it here. the best way is you wait for the final script

but for now you can play with this demo

WSH Panel Mod script discussion/help

Reply #1397
what is the point of trying to obfuscate your script? all you have to do is put it into a site like http://jsbeautifier.org to read it again. 

WSH Panel Mod script discussion/help

Reply #1398
A simple rating panel script using text instead of images. It uses the CUI/DUI configured fonts and colors by default. Font options, what characters to use for the ratings, text alignment ('left', 'center' or 'right' for the X axis, 'top', 'center' and 'bottom' for the Y axis) can be changed in properties. Ratings show a nice little visual feedback (glow) when the rating is changed and a new track comes in. Some screenshots:



Now the script:

http://pastebin.com/s2ByGKtF

EDIT: Forgot to mention, this script is in the public domain, do as you want with it, no restrictions.
EDIT2: It obviously requires the Playback Statistics component if you want to change the ratings.

WSH Panel Mod script discussion/help

Reply #1399
i have this function

Code: [Select]
function Function() {
var draw_x;
this.Draw = Function(x) {
      this.x=x;
      draw_x=this.x;
}
//using draw_x;
}
Function()

function on_paint(gr) {
Function().Draw(x);
}


i need to use draw_x after it draws, but it returns nothing. How can i do that?