#!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w use strict; use Coe; my $VERSION="1.1.4.1"; my $PRGM="COEPrompt"; if (@ARGV == 0) { useage; exit -1; } sub useage { print "Useage: COEPrompt [flags] {message}\n"; } my $count=40; my $label1="OK"; my $label2="Cancel"; my $arg1; my $msg; my $ret; while (@ARGV>0) { $arg1=cleanString(shift,4); if ("$arg1" eq "-h") { useage; exit 0; } elsif ("$arg1" eq "-H") { coeMan("COE_HOME/docs/man/$PRGM"); exit 0; } elsif ("$arg1" eq "-V") { print "VERSION: $VERSION\n"; exit 0; } elsif ("$arg1" eq "-C") { $count=cleanString(shift,4); } elsif ("$arg1" eq "--L") { $label1=cleanString(shift,4); $label2=cleanString(shift,4); } else { $msg=$arg1; $ret=coeRun("COE_COMP/JAVA2/bin/java", "-Dcfgfile=COE_HOME/lib/coeenv.txt", "-classpath", "COE_HOME/lib/opencoe.jar:COE_HOME/lib", "org.opencoe.coe.kernel.apps.COEDialog", "Prompt", "$count", "$label1", "$label2", "$msg"); exit $ret; } } |