Tol!k

|
Posted: Sat Apr 28, 2012 18:19 Post subject: |
|
|
с определением размера экрана
Code: | @echo off &setlocal enableextensions &chcp 1251 >nul
:: http://forum.wincmd.ru/viewpost.php?p=91908
:: Пример параметров: "%L" 3x4
set play=start HideC.exe mplayer.exe -noborder -ontop -loop 0 -shuffle -playlist %1
for /f %%s in (
'wmic DesktopMonitor get ScreenHeight^,ScreenWidth /value ^|find "="'
) do set "%%s"
for /f "tokens=1,2 delims=*xX:хХ/" %%x in ("%~2") do (set /a x=%%x &set /a y=%%y)
set /a Width=ScreenWidth/x &set /a Height=ScreenHeight/y
call :grid %x% %y% &goto :play
:play
for %%v in (%v%) do (
for %%h in (%h%) do (
%play% -x %Width% -y %Height% -geometry %%h:%%v
ping -n 3 localhost >nul
)
)
goto :eof
:grid
set /a h=v=_=.=0
for /l %%i in (2,1,%1) do (set /a _+=Width &call set "h=%%h%% %%_%%")
for /l %%i in (2,1,%2) do (set /a .+=Height &call set "v=%%v%% %%.%%")
goto :eof
|
изменён 2ой параметр |
|