Command to press the play/pause button in the player

Now many players (Windows Media, PowerDVD, etc.) use the universal play/pause button.

Tell me, is there a universal way to send the command to press this button in the application window?

 0
Author: Jones, 2011-04-08

2 answers

You can pass the same code, but you need to create a flag that will change depending on the number of clicks. And then you can only check the status of this flag.

 1
Author: 3JIoi_Hy6, 2011-04-15 15:21:12

If you pass the same code to your application, then pass the same code, and in the application, check if something is playing, then put it on pause, otherwise-vice versa. And if you use the multimedia keys on the keyboard, then I have, for example, one key for pause and playback.

 0
Author: Михаил Чемезов, 2011-04-09 10:32:10