We have been using OpenSong for several years. With the new 3.4.1 Beta version, we are having issues playing music files. For prior versions that we have used, you would chose the music file (.wma, .mp3, etc) as the external presentation. When we reached that point in the presentation, the default music player would open and play the file. It is no longer doing this. The external presentation is taking no action.
Anonymous
That was accidental behavior. You might be able to reproduce that by prefixing the path to the media file with 'start ' (so a space between start and the music file). The windows command start may launch the default player for the music file.
I can verify the change in behavior. It was introduced with revision 1354 of PresentWindow in the trunk, which was merged into the branch that built 3.4.1.
Let me look into this and see what might be possible to restore similar behavior to the previous versions.
I made the change so the "Wait for external application to finish before continue" option and the "Stop any currently running launched application" slide type will work on Windows. Operating systems other than windows remain unchanged. (I don't know if these functionalities work on those systems.)
Unfortunately I could not find any way to keep being able to launch documents (your sound file is a "document" in this regard) and fix these options.
Two suggestions:
I will consider adding an option to use the framework's own launching mechanism, which was used before and still is on the other operation systems. Maybe, some day, XoJo fixes it and makes it work for Windows.
Or maybe someone else happens to know how to use something equivalent to shellexecute and obtain the PID of the created process ...
Last edit: SvA 2021-01-26
ShellExecuteExW will return a handle to the process in the SHELLEXECUTEINFOW structure and that can be converted to a Process ID with GetProcessID.
There's a slight issue with this approach since the documentation for ShellExecuteExW indicates that hProcess can be zero even after a successful call if the program is already open. The example it uses is opening a HTML file with the default web browser already open.
On my branch I have modified Win32Process to call ShellExecuteExW with the "open" verb if the filename does not end in a valid program extension (defined as ".exe" and ".com"). The hProcess, PID, and hThread are moved out of the PROCESSINFOW structure to separate instance variables. In limited testing, I have successfully launched and terminated an MP3 file with the default player in addition to running a .EXE file.
This is not a perfect solution, but it is closer to the previous behavior using Shell.
I have not tested the other operating systems. I think it is unlikely that Shell on macOS or Linux will launch the default program for a file.
V3.4.2 has been released to incorporate the ShellExecuteEx fix. Data files should launch properly with the default program. Please reply here if it does not.
For others reading this thread, V3.4.2 is for Windows only. Linux and macOS users should continue to use V3.4.1. You are not missing out on anything. 🤓