Andreas - Just tested v1.3 - This is a great result - many thanks for your time & effort.
There are a few things about the modes that i'm not clear on, no doubt partly because my technical knowledge is pretty low. In particular i'm not quite sure what the "modal" mode actually is or whether it's really needed.
From the testing this is how the modes worked -

1. Autostart Mode - First track begins playing when Previewer is opened. I have access to all MM functions
2. Modal Mode - First track doesn't play when Previewer is opened. First track starts when 'Play' is selected in the dialogue. No access to MM functions
3. No Mode Selected - First track doesn't play when Previewer is opened. First track starts when 'Play' is selected in the dialogue. I have access to normal MM functions

In all 3 cases 'Pause' does not reset the Restrict Time value to full track length
In all 3 cases using any of the "preset Seek buttons' will reset the Restrict Time value to full track length.

So the features i need are all met from selecting item3 - No Mode selected.

I notice that it's possible to select both autostart & modal modes at the same time. I was expecting that it would be either/or.

Andreas - Thanks for the bug fix. I'd still like to get your feedback on the testing i did on the Modes. (refer my previous post). I would suggest that you don't really need the "Modal" selection box. I think it is simpler if the default behaviour is Item 3 - "No mode selected" Then if someone prefers to have AutoStart they can select it once the previewer is open. What do you think. It would be useful if a few other users chimed in here.

I have been testing the "Insert" functions & i notice that the behaviour is not as you describe. It inserts the preview track before the first track in the playlist not after the last played track before the previewer was opened.

Apart from these issues all the basic functions work well & the script is very stable.

Hi David !
Ok, I did not read you last post. because it was not there at my last post. (!?)
I think the 1.3.1 version is exact what you want but you does not know it. Did you really tested this version .
The previous version, where you manipulated the script to Modal=false could not work, it was not finished for the nonmodal mode. I suggested the manipulation only to show you how it could work.

Your mix the terms modal and autostart.
Modal means only which kind of dialog is used, it changes not the beheaviour. With the non modal mode the dialog catches NOT a application focus and you can access MM. This mode was from the very beginning my favourite, but I could not figure out a long time how to make it working.
Now it works and the modal mode can be removed indeed. But I let it in for backward compatibility. Disable modal and forget it.

The autostart (resp. disabled) works as wanted. If you start the dialog in this mode you can configure all and with click on PLAY all setting will be applied. The only thing what is not really perfect is the fact that you cannot decide which mode you want, before you start the dialog.
Maybe I can make a second hotkey/menuentry "Preview without start" or a checkbox-menuentry.

The insert bug I cannot reproduce! The previous song must really play or be paused before. The idea came from trimoxo. Hear something and insert some previewed songs as next. I think if nothing is played it use the first song.
Maybe be an 3. insert function would be nice. Insert it before the current focused in the now playing list.

I found here in my current version a bug: The close function opens the menu from the current playing list (because of hotkey c). Additional MM updates (visuell) sometimes not the manipulated playlist for the last song. Very strange.
Dont know if it is in the download version too.
I will make an update soon.

Jup, feedback and ideas from other user would be nice.
Regards Andreas

Andreas - Thankyou for the explanations. I had obviously misunderstood a few things.
I've re-tested the "Insert" function & now I can't reproduce the bug. Everything works fine. Your idea of an Insert 3 would be useful.

The previous versions made assumptions about some constant properties of MM in the background. This restriction I removed.
New Feature:
Working on a copy of the selected tracks and not on the current selection
=> Changing of the maintrack-window during working possible
(change selection or open an other playlist as drop target)
New Feature:
New button "insert song just before the current focused track" in the now-playing-list
New Feature:
Store custom window position as default (reset to screen-center possible)
Bugfix:
Caption of the Pause/Play-button did not toggle

While I have a song playing in the Previewer, I sometimes switch to my browser while it plays (Cyberfox/Firefox). If Previewer finishes playing the song while I'm still in the browser, the Previewer unfurls some manner of keyboard shortcuts that unleashes havoc in the browser (or any other program I'm in), with the only way to stop it being switching back to MediaMonkey.

Coldblackice wrote:There's a minor issue that I've finally tracked down the source of:

While I have a song playing in the Previewer, I sometimes switch to my browser while it plays (Cyberfox/Firefox). If Previewer finishes playing the song while I'm still in the browser, the Previewer unfurls some manner of keyboard shortcuts that unleashes havoc in the browser (or any other program I'm in), with the only way to stop it being switching back to MediaMonkey.

It seem that the MM-Interface has no function to close a window via code. (Somehing like Form.Close()). I asked in the forum for this function but I got no answer. The only way that MM provides is to click the X-button via mouse or press Alt-F4.

But I want that the window closes automatically after the last song was played. So I send in this moment a Alt-F4 key code. Windows processes this key-strokes global so that the current top-level window gets this key-strokes. This can be dangerous for this window.
(The following errors occur because the Previewer-windows not really closed. Dont know the exact reason now - but this can be fixed.)

But the main problem remains ! How to close a window via code? There is a lack in the MM-interface which I cannot bypass.
I will make some tests tomorrow:
set form = nothing
is my idea

Coldblackice wrote:There's a minor issue that I've finally tracked down the source of:

While I have a song playing in the Previewer, I sometimes switch to my browser while it plays (Cyberfox/Firefox). If Previewer finishes playing the song while I'm still in the browser, the Previewer unfurls some manner of keyboard shortcuts that unleashes havoc in the browser (or any other program I'm in), with the only way to stop it being switching back to MediaMonkey.

It seem that the MM-Interface has no function to close a window via code. (Somehing like Form.Close()). I asked in the forum for this function but I got no answer. The only way that MM provides is to click the X-button via mouse or press Alt-F4.

But I want that the window closes automatically after the last song was played. So I send in this moment a Alt-F4 key code. Windows processes this key-strokes global so that the current top-level window gets this key-strokes. This can be dangerous for this window.
(The following errors occur because the Previewer-windows not really closed. Dont know the exact reason now - but this can be fixed.)

But the main problem remains ! How to close a window via code? There is a lack in the MM-interface which I cannot bypass.
I will make some tests tomorrow:
set form = nothing
is my idea

Has there been a fix for this? I love the script, but unfortunately I'm going to have to disable it until this is fixed -- this script just closed a large number of windows I was working in without any warning at all. It really needs to not be using "global"-level functions like this.

If the Previewer window can't be closed safely, then it'd be best if it doesn't close on its own -- it'd be better (and safer) to just leave the window open. The user can then close it themselves when they come back in to MM. But throwing global ALT-F4's around is pretty dangerous. Even worse, it doesn't throw just one, it keeps throwing them. I watched windows and programs closing right before my eyes until I realized what it was and jumped back in to MM.

Yup you are right alt-f4 is indeed very dangerouse. I thought that somebody had an idear to mange the problem and posts it here - this was me idear and hope.
Best would be if MM integrates a interface to perform the simple and comman programming task to close the window !

Nevertheless is will investigate the problem again at the weekend. Maybe I can send a WM_Close message to the correct window ????
If not, I will disable the automatic closing (configurable). I must integrate some code to avoid an error if you forgot to close the window.

I came across your Plugin, and it has been something I've looked for on a player (In particular for parties!). Would be great to be able to set the start time at a given time rater than percentage, just like it is set for the play time duration. The only downside: The cross fade does not work with your script! It would be awesome if it did! Thanks for reading my comment!!!

Can you please make this "random" while listening to snippets and choosing music, so just keep what you have but make a random function? It just seems to pick from start to finish which is cool but random would make it awesome!