Mentalix Logo


Pixel!FX 2000

Maintenance
Options

Fed Submit
Application Note
Index

Pixel!FX Application
Note Index

Links by Subject
Links by Platform
Links by Scanner

Y2K Compliance

Pixel!FX 2000
Release Info

View Guided
Product Tours

Site Index




Mentalix Application Note #20001
Sample execTcl Script
Example 1: Specialized save function

#################################################################
#                                                               #
# This procedure allows you to customize one Pixel!FX Image     #
# window, without displaying an Image Album. It also            #
# allows you to create a specialized save function.             #
#                                                               #
#################################################################
#
proc mysave { w }
  set i [$w getimag]
  $i save /tmp/foo.tif tiff
  message "Save completed!"
 }

 if {$argc != 1} {
  message "Expected <filename> argument for TCL script"
  exit
 }
 set pfx [album top]
 $pfx hide
 insticon pixmaps/hello.xpm
 workext mysave pixmaps/hello.xpm "My custom Save Function" mysave
 set w [work $pfx -standalone -noedits -norulers -nostatus -hasexit
 -noload -nosave]
 set code [catch { $w load [lindex $argv 0] -quiet } string]
 if { $code == 1 } {
  message "Error: $string!"
  exit
}
$w show

For additional information or assistance, please call Mentalix Technical Support at (972) 423-9377 Ext. 33.