I still have so much to learn...
Is it possible to make a contraption of this like instancing it like an object? |
Excel:
Layout:
Meter:
Code: Select all
;@includeLayoutExcel=#@#Includes\Excel\Layouts\Excel.min.inc
[IncludesModules]
@includeModuleExcel=#@#Includes\Excel\Modules\Excel.inc
;___Excel___
[MeterExcelImage]
Meter=Image
ImageName=#@#Images\Applications\Excel.png
X=#xImage#
Y=#yExcel#
W=#sPicture#
H=#sPicture#
LeftMouseUpAction=["#@#Plugins\TaskKiller.exe" "#ExcelExe#"]
ToolTipTitle=taskkill #ExcelExe#
ToolTipType=1
ToolTipIcon=WARNING
ToolTipText=taskkill /im #ExcelExe# /f
DynamicVariables=1
[MeterExcelLabel]
Meter=String
MeterStyle=styleLeftText
MeasureName=MeasureExcelRAMforScaling
MeasureName2=MeasureExcelIORforScaling
MeasureName3=MeasureExcelIOWforScaling
X=#xLabel#
Y=#yExcel#
W=#wLabel#
H=#hText#
Text=Excel [#ExcelExe#]
ToolTipTitle=#Excel#
ToolTipType=1
ToolTipIcon=INFO
ToolTipText=CPU : [MeasureExcelCPU:1]%#CRLF#RAM : %1B#CRLF#IORead : %2B/s#CRLF#IOWrite : %3B/s
DynamicVariables=1
[MeterExcelProcess]
Meter=String
MeasureName=MeasureExcel
MeterStyle=styleRightText
X=#xProcess#
Y=0r
W=#wProcess#
H=#hText#
Code: Select all
;@includeModuleExcel=#@#Includes\Excel\Modules\Excel.inc
[Variables]
Excel=EXCEL
ExcelExe=#Excel#.EXE
;___Excel___
[MeasureExcelProcess]
Measure=Plugin
Plugin=Process
ProcessName=#ExcelExe#
[MeasureExcelCPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=CPU
Name=#Excel#
[MeasureExcelRAM]
Measure=Plugin
Plugin=UsageMonitor
Alias=RAM
Name=#Excel#
[MeasureExcelRAMforScaling]
Measure=Calc
Formula=MeasureExcelRAM
[MeasureExcelIOR]
Measure=Plugin
Plugin=UsageMonitor
Alias=IOREAD
Name=#Excel#
[MeasureExcelIORforScaling]
Measure=Calc
Formula=MeasureExcelIOR
[MeasureExcelIOW]
Measure=Plugin
Plugin=UsageMonitor
Alias=IOWRITE
Name=#Excel#
[MeasureExcelIOWforScaling]
Measure=Calc
Formula=MeasureExcelIOW
[ToggleExcel]
Measure=Calc
IfCondition=MeasureExcelProcess > 0
IfTrueAction=[!SetOption MeterExcelProcess MeterStyle styleRightTextON][!SetOption MeterExcelImage GreyScale 0][!EnableMouseAction MeterExcelImage "LeftMouseUpAction"][!SetOption MeterExcelImage ToolTipHidden 0][!SetOption MeterExcelLabel ToolTipHidden 0]
IfFalseAction=[!SetOption MeterExcelProcess MeterStyle styleRightTextOFF][!SetOption MeterExcelImage GreyScale 1][!DisableMouseAction MeterExcelImage "LeftMouseUpAction"][!SetOption MeterExcelImage ToolTipHidden 1][!SetOption MeterExcelLabel ToolTipHidden 1]
Layout:
Measure:
Code: Select all
;@includeLayoutWord=#@#Includes\Word\Layouts\Word.min.inc
[IncludesModules]
@includeModuleWord=#@#Includes\Word\Modules\Word.inc
;___Word___
[MeterWordImage]
Meter=Image
ImageName=#@#Images\Applications\Word.png
X=#xImage#
Y=#yWord#
W=#sPicture#
H=#sPicture#
LeftMouseUpAction=["#@#Plugins\TaskKiller.exe" "#WordExe#"]
ToolTipTitle=taskkill #WordExe#
ToolTipType=1
ToolTipIcon=WARNING
ToolTipText=taskkill /im #WordExe# /f
DynamicVariables=1
[MeterWordLabel]
Meter=String
MeterStyle=styleLeftText
MeasureName=MeasureWordRAMforScaling
MeasureName2=MeasureWordIORforScaling
MeasureName3=MeasureWordIOWforScaling
X=#xLabel#
Y=#yWord#
W=#wLabel#
H=#hText#
Text=Word [#WordExe#]
ToolTipTitle=#Word#
ToolTipType=1
ToolTipIcon=INFO
ToolTipText=CPU : [MeasureWordCPU:1]%#CRLF#RAM : %1B#CRLF#IORead : %2B/s#CRLF#IOWrite : %3B/s
DynamicVariables=1
[MeterWordProcess]
Meter=String
MeasureName=MeasureWord
MeterStyle=styleRightText
X=#xProcess#
Y=0r
W=#wProcess#
H=#hText#
Code: Select all
;@includeModuleWord=#@#Includes\Word\Modules\Word.inc
[Variables]
Word=WINWORD
WordExe=#Word#.EXE
;___Word___
[MeasureWordProcess]
Measure=Plugin
Plugin=Process
ProcessName=#WordExe#
[MeasureWordCPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=CPU
Name=#Word#
[MeasureWordRAM]
Measure=Plugin
Plugin=UsageMonitor
Alias=RAM
Name=#Word#
[MeasureWordRAMforScaling]
Measure=Calc
Formula=MeasureWordRAM
[MeasureWordIOR]
Measure=Plugin
Plugin=UsageMonitor
Alias=IOREAD
Name=#Word#
[MeasureWordIORforScaling]
Measure=Calc
Formula=MeasureWordIOR
[MeasureWordIOW]
Measure=Plugin
Plugin=UsageMonitor
Alias=IOWRITE
Name=#Word#
[MeasureWordIOWforScaling]
Measure=Calc
Formula=MeasureWordIOW
[ToggleWord]
Measure=Calc
IfCondition=MeasureWordProcess > 0
IfTrueAction=[!SetOption MeterWordProcess MeterStyle styleRightTextON][!SetOption MeterWordImage GreyScale 0][!EnableMouseAction MeterWordImage "LeftMouseUpAction"][!SetOption MeterWordImage ToolTipHidden 0][!SetOption MeterWordLabel ToolTipHidden 0]
IfFalseAction=[!SetOption MeterWordProcess MeterStyle styleRightTextOFF][!SetOption MeterWordImage GreyScale 1][!DisableMouseAction MeterWordImage "LeftMouseUpAction"][!SetOption MeterWordImage ToolTipHidden 1][!SetOption MeterWordLabel ToolTipHidden 1]
As you can see, the only difference is: Excel > Word
And i have this for ~10 applications...
So i did a script to create everything, but it's still not good...
Code: Select all
@rem newInclude.bat
@echo off
if [%~1]==[] goto usage
if [%~2]==[] goto usage
SET mypath=%~dp0
robocopy /MIR %mypath:~0,-1%\.example %mypath:~0,-1%\%~1 /W:0 /R:0
ren %mypath:~0,-1%\%~1\Layouts\.example.full.inc %~1.full.inc
ren %mypath:~0,-1%\%~1\Layouts\.example.std.inc %~1.std.inc
ren %mypath:~0,-1%\%~1\Layouts\.example.min.inc %~1.min.inc
ren %mypath:~0,-1%\%~1\Modules\.example.inc %~1.inc
powershell -Command "(gc %mypath:~0,-1%\%~1\Layouts\%~1.full.inc) -replace '\.example', '%~1' | Out-File -encoding ASCII %mypath:~0,-1%\%~1\Layouts\%~1.full.inc"
powershell -Command "(gc %mypath:~0,-1%\%~1\Layouts\%~1.std.inc) -replace '\.example', '%~1' | Out-File -encoding ASCII %mypath:~0,-1%\%~1\Layouts\%~1.std.inc"
powershell -Command "(gc %mypath:~0,-1%\%~1\Layouts\%~1.min.inc) -replace '\.example', '%~1' | Out-File -encoding ASCII %mypath:~0,-1%\%~1\Layouts\%~1.min.inc"
powershell -Command "(gc %mypath:~0,-1%\%~1\Modules\%~1.inc) -replace '\.example', '%~1' | Out-File -encoding ASCII %mypath:~0,-1%\%~1\Modules\%~1.inc"
powershell -Command "(gc %mypath:~0,-1%\%~1\Modules\%~1.inc) -replace '\.exeexample', '%~2' | Out-File -encoding ASCII %mypath:~0,-1%\%~1\Modules\%~1.inc"
echo Done
goto :eof
:usage
@echo Usage: %~0 ^<NewIncludeName^> ^<NewIncludeProcessName^>
exit /B 1
Is it possible to have only a parent call that will create two children?
|