Author Topic: Application window hidden when I tell Winbatch to display it normally.  (Read 97 times)

pguild

  • Newbie
  • *
  • Posts: 29
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

  • Tech Support
  • *****
  • Posts: 3103
    • WinBatch
Re: Application window hidden when I tell Winbatch to display it normally.
« Reply #1 on: September 27, 2019, 08:30:00 am »
Microsoft works in mysterious ways but this works for me

Code: Winbatch
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