Application window hidden when I tell Winbatch to display it normally.

Started by pguild, September 25, 2019, 08:52:03 PM

Previous topic - Next topic

pguild

I am playing an mp3 file like this:

    runshell( mp3file, "", "",@NORMAL, @NOWAIT)
    ;runshell( programname, params, directory, @NORMAL|@ICON|@ZOOMED|@HIDDEN, @WAIT|@NOWAIT|@GETPROCID|@GETEXITCODE )

Windows Media Player is set as the default player for .mp3 files.

Earlier the program such as windows media player show up playing the file
.
Then I set the argument to @HIDDEN and the application was hidden as expected.
The mp3 file plays OK.

However, when I switched @HIDDEN back to @NORMAL -- the application stays hidden.

The challenge is that the user cannot pause the playback if he wants to.
What's going on? How do I fix it?

td

Microsoft works in mysterious ways but this works for me

Code (winbatch) Select
ShellExecute('Test.mp3','','', @NORMAL , 'Open')

after executing the same function with the "@HIDDEN" flag.  But your mileage may vary.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade