Skip to main content
InSource Solutions

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");

clipboard_e5254a60100da552849593d41f50db780.png

 

The bat file then calls the Power shell script.

START "" powershell -NoLogo -WindowStyle Hidden -ExecutionPolicy Bypass -Command "C:\Users\dNichi\Desktop\minAll.ps1"

clipboard_eccce2dc3a99d915673e1634927050d2d.png

 

The Power shell script then minimizes all windows.


$shell = New-Object -ComObject "Shell.Application"
$shell.minimizeall()

clipboard_e918c1bd41e36c0a09dc4d013a1ed102d.png

 

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()

clipboard_ef52ab9754459a2de47bc7d0b4f83af63.png

 

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()

clipboard_eda0b04c1747790a76ad4bb3d3b9759cc.png

  • Was this article helpful?