Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Запуск нескольких файлов с автоматическим расположением 
Author Message
Tol!k



PostPosted: Sat Apr 28, 2012 18:19    Post subject: Reply with quote

с определением размера экрана
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ой параметр
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group