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.
|