dtksh was developed to solve problems like this. It is an advanced form of ksh with many add-ons that result in virtually the entire x api being available to the shell programmer. The scripts are really x clients in themselves that can run without using a xterm client for support.
But its power is also its shortcoming. The learning curve is very steep. Sample code:
Code:
widget=${Progs[ii]}
XtGetValues $widget x:x y:y
XtDestroyWidget $widget
XtCreateManagedWidget BUTTON pushbutton XmPushbutton $BBOARD \
background:$colorBackSave \
foreground:$colorForeSave \
highlightColor:$colorBackGround highlightThickness:0 \
labelString:$asys2 \
height:$Bheight width:$bwidth1 x:$x y:$y \
fontList:"$lblfont" \
shadowThickness:4
XtAddCallback $BUTTON activateCallback buttonpushed
XTAddCallback $BUTTON armCallback buttonArmed
RequestOp[$BUTTON]=$opsave
RequestArg[$BUTTON]=$asys
Progs[ii]=$BUTTON
ProgsA[$BUTTON]=$ii
That put a pushable button on the screen. But still, if you know x and ksh very well, you can get it done.
Besides dtksh, there are other interpreted lauguages out there with a graphical interface. But dtksh is the only one I have tried.
Another approach is to use html. Then you run a web server and web browser on the same box and let the operator fire up the browser. html is
much easier than x.