MUST2
SAMURAI_2018
S3-LEB-LPC
SUPERNEMO
MUGAST
EXPAND
SCALP
GALATRON
HiCARI
VELO
|
MUST2 |
Not logged in |
|
|
Message ID: 637
Entry time: Sun Jun 24 16:11:38 2018
|
Author: |
daisuke |
ExpNbr: |
e755 |
Type: |
ONLINE |
Category: |
Software |
Status: |
Fixed |
Target-Source: |
N/A |
Subject: |
Automated screenshot |
|
|
automated screenshot commands
shot: Capture the window selected by the mouse
shotall: Capture the current display
shotvisu: Capture Vigru window
shotsca: Capture Scaler window
shotdas: Capture DAS window
shotrc: Capture Run controller window
img: Move to the save folder /home/e748/Images/e738_e755
Shotcut icons are available on the Desktop (in the picture in the attachment 1).
PNG images will be stored to:
/home/e748/Images/e738_e75
The macros are in the same directory.
/home/e748/Images/e738_e755/screenshot.sh
*** To capture a window, move to the workspace where the given window exists. The window is not necessary to be active, but should be unfolded. |
|
|
|
#!/bin/tcsh
if ($1 =~ select) then
echo 'Select a window to be captured.'
echo ''
set header='screenshot_'
set quality=100
set window_id='none'
else if ($1 =~ display) then
echo 'Display captured'
set header='screenshot_'
set quality=100
set window_id='root'
else if ($1 =~ visu) then
echo 'ViGRU window captured.'
set header='visu_'
set quality=100
set window_id=`xwininfo -name ' Vigru 18.03.12' | awk '{print $4}' | grep -i 0x`
else if ($1 =~ scaler) then
echo 'Scaler window captured.'
set header='scaler_'
set quality=50
set window_id=`xwininfo -name 'SCALER ANALYSER v14.03-03 [Language : English(en)]' | awk '{print $4}' | grep -i 0x`
else if ($1 =~ das) then
echo 'DAS window captured.'
set header='das_'
set quality=100
set window_id=`xwininfo -name 'GANIL DAS v14.03-03 [Language : English(en)] e755' | awk '{print $4}' | grep -i 0x`
else if ($1 =~ rc) then
echo 'Run Control window captured.'
set header='rc_'
set quality=100
set window_id=`xwininfo -name 'Run Control GUI' | awk '{print $4}' | grep -i 0x`
endif
set save_dir = ~/Images/e738_e755/
set datetime = `date +%Y-%m-%d_%Hh%Mm%Ss`
set file_name = "$save_dir$header$datetime.png"
if ($window_id =~ none) then
import -quality $quality $file_name
else
import -quality $quality -window $window_id $file_name
endif
echo "Window ID $window_id saved to $file_name"
|