Print Page | Close Window

Action field in custom menu

Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: Scripting & Automation
Forum Description: Customize and control AccuTerm using scripts and automation
URL: https://forum.asent.com/forum_posts.asp?TID=2548
Printed Date: March 26 2026 at 8:51pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Action field in custom menu
Posted By: crubeor
Subject: Action field in custom menu
Date Posted: September 30 2015 at 1:21pm
The short version of the question - is it possible to run a gui program from a new menu item?
 
Long version of the question.  I've created a number of gui programs that the users kick off by entering a command at some point in the application.  i.e., they enter "Fred" from the Invoice screen to get to one particular gui, or they may enter "Barney" at one of the menus to get to another.  They also have a bunch of tcl commands to kick off certain other gui programs.  In order to make life simpler, I would like to add a custom menu item, "Slate", just to the right of the Help Menu, using the menu customization tool.  That much I've already done.  Now, I just to need to add menu items and specify an ACTION which will kick off a gui program.  For example, how can I run the PRINT.INVOICE gui when the user clicks on "Slate", then "Print Invoice".



Replies:
Posted By: PSchellenbach
Date Posted: September 30 2015 at 3:29pm
Hi Charlie -

You can certainly create a menu item with an action that sends the string "Fred" followed by a CR to the host. The problem is, how can you tell if the program running on the host will recognize the string "Fred" and fire off the desired GUI?

The WED Editor and GUI Designer toolbar buttons employ a little trick and try to determine if the session is at TCL. Before launching the WED or GED programs on the host, the send the string "FTTCL" followed by a CR, and look for the response "**TCL**", and if the correct response is recognized then they send the string "WED" or "GED" followed by a CR.

So, if you have complete control over the state of the program on the host, and can guarantee that when the string "Fred" is entered in any field, the program thats currently running will fire off your GUI program, then your job is easy. On the other hand, if you need to determine what the state of the running program is, possibly send it inputs to get to the correct state, then start your GUI program, then its going to be much more difficult.

Hope that makes sense.

Thanks,

Pete




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net