1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#include "stdafx.h"
#include "Windows.h"
#include <conio.h>
#include <process.h>
#include "winuser.h"
int buffer= 3;//exemple de commande recu en wifi
int _tmain(int argc, _TCHAR* argv[])
{
system(" C:\\Progra~1\\VideoLAN\\VLC\\vlc.exe C:\\playlist.m3u");//ouverture de la playlise
for (int i=0; i=buffer;i++)
{
HWND id = FindWindow(NULL,_T("VLC"))//recu le handle de la fenetre vlc;
SetForegroundWindow(id);
SendMessage(id,WM_KEYDOWN,'N',0);//evenement apuis touche n
SendMessage(id,WM_KEYUP,'N',0);//evenement de relache touche n
}
} |
Partager