[foxboro] Sharing .ksh script for FoxView display & overlay screenshots

  • From: "Neufeld, Brahm" <Brahm.Neufeld@xxxxxxxxxx>
  • To: "foxboro@xxxxxxxxxxxxx" <foxboro@xxxxxxxxxxxxx>
  • Date: Wed, 18 Nov 2015 08:24:11 -0600

I cobbled this script together based on a few old list posts (mainly
http://www.freelists.org/post/foxboro/foxboro-HMI-SCREEN-SNAPSHOTS,6)

- Jumps through directories recursively

- Saves all screenshots to a common directory with path as filename
(eg. -opt-display-processcell1-graphic.fdf.png)

- Swaps between c and d drives, since hypersnap comes installed on c
on newer boxes.

- Uncomment noted lines to capture overlays

- One thing to improve; could specify dimensions to capture just the
HMI graphic and not the whole FoxView window.

- You need to build a blank display (BLANDSCRN.fdf)

- To run, call script, then click on the FoxView to "focus" on the DM
you substitute into the script, this ensures Hypersnap grabs the active window
(-snap:awin)

- Tested on FoxView 10.4.2, I/A 9.1.576

---
# replace SPR3SR with current DM of whatever machine is generating screenshots.
# for sub directories
# for DISP in `ls -1 -R /opt/control/**/*.fdf`
# for single directories
for DISP in `ls -1 -R /opt/control/*.fdf`
do
cd d:
pref -SPR3SR dmcmd /opt/disp/BLANKSCRN.fdf
sleep 2
echo $DISP
# uncomment if capturing displays
pref -SPR3SR dmcmd $DISP
# uncomment if capturing overlays
# pref -SPR3SR dmcmd "dmcmd ov $DISP -l MIDDLE -move"
# time to ensure all graphic elements load
sleep 10
cd 'C:/Program Files (x86)/HyperSnap 6'
echo $PWD
# build filename that includes path
FILE=$(echo $DISP | sed 's/\//-/g')
echo $FILE
SAV="D:/opt/screenshots/$FILE.png"
echo $SAV
HprSnap6 -snap:awin -save:png $SAV
# uncomment if capturing overlays
# pref -SPR3SR dmcmd close
done

exit
---

Brahm Neufeld


________________________________
For more information on Agrium's E-Mail Policy or to unsubscribe, click here:
http://www.agrium.com/email_footer_en.jsp
Pour plus de renseignements sur la politique de courrier ?lectronique d'Agrium
ou pour vous d?sabonnez, cliquez ici : http://www.agrium.com/email_footer_fr.jsp



_________________________________________________________________________
This mailing list is neither sponsored nor endorsed by Schneider Electric
(formerly The Foxboro Company). Use the info you obtain here at your own
risks. See the disclaimer at www.thecassandraproject.org/disclaimer.html

foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave


Other related posts:

  • » [foxboro] Sharing .ksh script for FoxView display & overlay screenshots - Neufeld, Brahm