Announcement

Collapse
No announcement yet.

Winamp Scripting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    Think the first one is on purpose.

    Try this:
    playlist_Enqueue album.vbs
    code:

    x = playlist.getselection()

    if ubound(x,1) > 0 then
    mlq = medialibrary.runqueryarray("album HAS """ + x(1).album + """")

    for each track in mlq
    track.enqueue
    next

    end if

    quit

    Edit: The scripting is a great idea - brings a lot of fun
    Keep on with this shaneh though DrO is afraid he'll get out of work
    Last edited by AnodA; 10 September 2004, 22:59.

    Comment


    • #47
      I guess you could use something like:

      pos = x(1).position
      myitem = LoadItem("separator://")
      myitem.insert(pos)

      to insert a separator at the position. The reason it doesn't include the selected track is because it is already in your playlist. Just remove the

      if strcomp(track.filename, x(1).filename) <> 0 then

      which checks if the track about to be inserted is not the same as the first one selected.
      Music Plugins

      Comment


      • #48
        Is it odd that i cant get the script shortcuts to work on an old Win98 machine? Other shortcuts are working - scripts working with rightclick. All things are working on my XP machine.
        (AMD-K6 200, Win98 SE, WinScript 5.6, Winamp 5.05 (clean install+script))
        Any ideas about that?

        Comment


        • #49
          I assume you are talking about global hotkeys? Do other global hot keys work? Try removing the shortcuts, re-adding the key combination then restart winamp. Otherwise I am not sure, the scripts are invoked in an identical way as from the playlist menu. So if they work, there could be a problem with the registration of the global hotkey.

          Also, many of the scripts make use of the selection rather than the current position etc, so it could be that they are running but just not getting the selection correctly. Try making a script with just a msgbox and see if its running ok.
          Music Plugins

          Comment


          • #50
            okay... so if i wanted it to insert the separator at the beggining of the inserted album, and then again at the end(as if to seperate it from the rest of the playlist) how would i do that... also... how would i get the script to play(like a 'insert and play') command...

            so if i wanted to hit the script... and it would insert the entire album in order(including the song i rightclicked) then start playing it, all the while separating it from the playlist...

            im probably asking for too much, but that would be totally awesome...
            There is no reset button on life... but the graphics kick ass

            Comment


            • #51
              You make use of playlist.position and playlist.count. If you enqueue something, it gets put at the end, so basically just set:

              playlist.positon = playlist.count
              Then enqueue everything
              then "play"

              Otherwise if you are inserting stuff, then just set playlist.position to wherever you are inserting, then "play".

              To insert a separator at the beginning and end, just insert one before inserting everything, and after.

              I'll include a script which does this with the next update. For now I am fixing ATFString which is horribly broken at the moment, when Im done it will actually work and should be quite fast too.
              Music Plugins

              Comment


              • #52
                +Many basic methods and properties to the base application object, media items and playlist (skin, shuffle, version, repeat, show notification etc.) Open the .tlb to see them all

                +Much improved and fixed ATFString method, plus caches information better. Getting tag information after a media library query or getting the length from a playlist selection will be *much* faster.

                Added another basic script for inserting all items from an artist, with a separator. Doesnt use an external plugin for the separator, just uses inbuilt support from Winamp (using x:\--------..). I think its better as it means not having another input plugin loaded and you can specify anything you want as the separator at run time. And it doesnt have a length value in the playlist. But you can edit it to use whatever you like.

                Also another script to add separators before a selection of playlist entries.

                removed the playlist count fixer script cause its a little buggy when you have a zero playcount.
                Attached Files
                Last edited by shaneh; 11 September 2004, 11:32.
                Music Plugins

                Comment


                • #53
                  Er yes, global hotkeys (nstGlobalHotkeys v1.3). Other global hotkeys work. Even the most simple script doesn't work with global hotkey (only msgbox for example). Tried adding removing in all kinds of ways. So it's a problem with the registration, is it?

                  Comment


                  • #54
                    I have the same version of global hot keys, and have tried this exact same version and it works fine. I used the exact same method in Toaster, have you tried that plugin? Do the hot keys work for that?

                    I assume you dont have any other plugins which could be interferring with it.

                    It seems strange, as it the standard method for registering hot keys that all the plugins in winamp would use.

                    The one thing I do have suspicions on is the order in which the plugins are loaded. If the global hotkey plugin isnt loaded before this script plugin is, there could be problems. Try renaming it gen_zscript.dll or gen_ascript.dll and see if it helps. If it does, I am already planning a fix that will help this and other potential problems.

                    EDIT: yes that seems to be the problem, the next versin will fix this. until then just rename the plugin gen_zscript.dll. Although, you shouldnt even be having the items listed in the hotkey config screen if this is the problem you are experiencing, so im not sure.
                    Music Plugins

                    Comment


                    • #55
                      Originally posted by shaneh

                      +Much improved and fixed ATFString method, plus caches information better. Getting tag information after a media library query or getting the length from a playlist selection will be *much* faster.

                      My god that's what I call "much improved" !!
                      My script now takes 3 seconds to execute instead of 3-4minutes with the old version !

                      Nice work Shaneh.
                      But I still have a problem with sorting the results, they're unfortunately not in EXACT reverse order
                      the sort function is recognize wy windows (sort export.txt scroll all the file) but do not results in a sorted file ?!
                      Last edited by neFAST; 11 September 2004, 14:17.

                      Comment


                      • #56
                        You can just pipe the results to another file. ie

                        sort songs.txt > songs2.txt

                        You can run this from within your script using

                        set wsh = CreateObject("Wscript.Shell")
                        wsh.Run "sort songs.txt > songs2.txt"

                        or something like that. Otherwise, if you need more defined sorting, or dont want to use another file, you will just need to do the sorting yourself internally.

                        There is an example of the quick sort alogorithm in a couple of the scripts. You will need to make a few modifications to make it sort on the array returned from the querey but it is certainly possible, and wouldnt take too long. I'll include it as an example in my next update for people to look at.
                        Music Plugins

                        Comment


                        • #57
                          I've a little problem, it seems that track.artist track.album and %artist% return the album field while %album% doesn't return anything ???

                          could you check this please ?

                          Comment


                          • #58
                            Some kind of strange. I did another clean install without jumpex and TControl and suddenly its working. Installed the newest version of them and its still working. Tried more of DrOs plugs, because i remebered there was a similar problem with his plugs some time ago. Problem appears again only with his lastest 'skinned prefs' plugin. But it wasn't installed before - I did a clean install, too. I'm confused. But maybe the problem was somehow at his side.

                            Edit:
                            Originally posted by shaneh

                            +Much improved and fixed ATFString method, plus caches information better. Getting tag information after a media library query or getting the length from a playlist selection will be *much* faster.
                            Yeh, it's really fast.

                            Comment


                            • #59
                              @nefast: yep, oops. Theres probably a few bugs like that, I'll try squash them all over time, let me know if theres anything else strange like that. Theres a lot of different cases that need to be covered, when the media library isnt available, when the item has been created from the media library so the info has been cached, when it hasnt, when accessed through ATF, through a property etc, etc, etc.

                              To keep it nice and fast stuff is only loaded on demand, and when it is its cached for later, so it gets a little complicated.

                              I think I fixed the album/artist problem in this release.
                              Attached Files
                              Music Plugins

                              Comment


                              • #60
                                Originally posted by AnodA
                                Some kind of strange. I did another clean install without jumpex and TControl and suddenly its working. Installed the newest version of them and its still working. Tryed more of DrOs plugs, because i remebered there was a similar problem with his plugs some time ago. Problem appears again only with his lastest 'skinned prefs' plugin. But it wasn't installed before - I did a clean install, too. I'm confused. But maybe the problem was somehow on his side.
                                seeing as skinned prefs is labelled as alpha from memory you can expect some issues

                                the order in which plugins loads can affect things if the chain of loading isn't as expected. doing a rename of the plugin or installing it again is often likely to fix the problem so that when winamp searches for the files it will find the newer one later in the process so the existing ones can be found. aren't plugins fun

                                Keep on with this shaneh though DrO is afraid he'll get out of work
                                this plugin is just another way to do things and i'm not afraid since i've got other projects in the works anyway

                                -daz
                                WACUP Project <‖> "Winamp Ramblings" - Indie Winamp Dev Blog

                                Comment

                                Working...
                                X
                                😀
                                🥰
                                🤢
                                😎
                                😡
                                👍
                                👎