Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sat Mar 17, 2018 5:08 am Post subject: Play Video [Launch WMP using CE] |
|
|
Just to test play video using CE Lua :
Code: | -- copy and paste to your CE Lua Table and execute :
f=createForm();f.width,f.height,f.BorderStyle,f.caption = 150,130,'bsDialog','Video Player';b1=createButton(f);
b1.left,b1.top,b1.width,b1.height,b1.caption=10,10,130,30,'Play Video';b2 =createButton(f);b2.left,b2.top,b2.width,b2.height,b2.caption=10,50,130,30,'Stop Video';
b3=createButton(f);b3.left,b3.top,b3.width,b3.height,b3.caption=10,90,130,30,'Exit';function playFV();
load_dialog = createOpenDialog(self); load_dialog.InitalDir = os.getenv('%USERPROFILE%');
load_dialog.Filter = 'Video files|*.mp4;*.wmv|Mp4 files (*.mp4)|*.MP4|WMV files (*.wmv)|*.WMV|*'
load_dialog.execute();local file = load_dialog.FileName;pcommand = 'start wmplayer '..'"'..file..'"';os.execute(pcommand);end;
function stopFV();os.execute('PING 1.1.1.1 -n 1 -w 100 >NUL') --12500 >NUL');
os.execute('taskkill /f /im wmplayer.exe'); os.execute('exit');end;function closeFV();os.execute('PING 1.1.1.1 -n 1 -w 100 >NUL') --12500 >NUL');
os.execute('taskkill /f /im wmplayer.exe');os.execute('exit');closeCE();return caFree;end;
b1.onClick = playFV;b2.onCLick = stopFV;b3.onClick = closeFV; |
Cheers...
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|