TN - 1284 Minimize And Maximize InTouch View Dynamically
Description
This article from InSource shows an option for dynamically minimizing and restoring InTouch view.
- Author: Mario Meza
- Published: 09/19/2022
- Applies to: InTouch 2014 R2 SP1
Details
There isn't a built in way to dynamically update window viewer features (such as minimize & maximize buttons). However you can call a .bat file that calls a Powershell script that minimizes / restores view.
For example place a button with an action script that calls the .bat file
StartApp("C:\Users\dNichi\Desktop\MinAll.bat");
The bat file then calls the Power shell script.
START "" powershell -NoLogo -WindowStyle Hidden -ExecutionPolicy Bypass -Command "C:\Users\dNichi\Desktop\minAll.ps1"
The Power shell script then minimizes all windows.
$shell = New-Object -ComObject "Shell.Application"
$shell.minimizeall()
You can restore the minimized windows with the following power shell script likely based off a condition script or....
Restore
$shell = New-Object -ComObject "Shell.Application"
$shell.undominimizeall()
This script will minimize and restore based on the sleep interval.
Minimize & Restore with a Delay
$shell = New-Object -ComObject "Shell.Application"
$shell.MinimizeAll()
start-sleep -Seconds 5
$shell.undominimizeall()