Can someone point me in the right direction?
I have the following simple FvwmForm definition :
*RunCommandTitle "Run a command"
*RunCommandFore black
*RunCommandBack grey70
*RunCommandFont *helvetica*b*r*n*14*
*RunCommandFore navy
*RunCommandLine center
*RunCommandFont *helvetica*b*r*n*12*
*RunCommandButtonFont *helvetica*b*r*n*12*
*RunCommandInputFont -sun-screen-medium-r-*-*-12-*-*-*-*-*-*-*
# items
*RunCommandText "Command line"
*RunCommandInput cmd 40 ""
*RunCommandLine right
*RunCommandItemFore darkred
*RunCommandButton quit " OK " ^M
*RunCommandCommand exec exec $(cmd)
#*RunCommandCommand RunCmd $(cmd)
*RunCommandItemFore black
*RunCommandButton quit " Cancel " ^[
*RunCommandCommand nop
This works fine, but I'd like to add a "last command" button to the
form. Adding the additional button is easy, but I'm stumped on how to :
1. Save $(cmd) between invocation
2. Load cmd with $(lastcmd) (or whatever) with a button press
Ideally, I'd like to be able to visually see the last command line
reloaded into the cmd text field, then just click OK to run it. An
alternate solution (though less ideal to me) would be to simply run the
last $(cmd) when the last button was clicked.
I can substitute the direct exec on the run button with the following
rather obvious function (commented above), but I'd like to also have it
save the command line :
AddToFunc RunCmd
+ "C" exec exec $0
If anyone can point me in the right direction, I'd appreciate it.
Thanks.
--
+-----------------------------------------------------+
| Len Philpot ><> http://philpot.org/ |
| len_at_philpot.org len_philpot_at_hotmail.com (alt) |
+-----------------------------------------------------+
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Sep 26 2002 - 20:14:00 BST