cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Adding a Comment in the middle of a Mapkey?

dbower1
1-Newbie

Adding a Comment in the middle of a Mapkey?

Trying to add a comment in the middle of a mapkey... Using '!' to designate start of a comment isnt working. Any help would be appreciated.

 

Thanks in Advance!

 

David

 

Update see also: https://community.ptc.com/t5/System-Administration/Mapkey-Writing-Editing-Tips/m-p/443737/highlight/false#M6980

4 REPLIES 4
RandyJones
19-Tanzanite
(To:dbower1)

On 04/28/14 12:03, David Bower wrote:
>
> Trying to add a comment in the middle of a mapkey... Using '!' to designate start of a comment isnt working. Any help would be appreciated.
>

You can't add a comment in the middle. All comments need to be before (or after) the mapkey.

> Thanks in Advance!
>
> David
>
>
> -----End Original Message-----


--
------------------------------------------------------------------------
Randy Jones
Systems Administrator
Great Plains Mfg., Inc.
1525 E North St
PO Box 5060
Salina, KS USA 67401
email: -
Phone: 785-823-3276
Fax: 785-667-2695
------------------------------------------------------------------------

Thanks Randy!

It depends what you mean by comment.

You can add comments to guide users along with the use of a mapkey, examples:

mapkey(continued) @MANUAL_PAUSE1) Select desired format.\n\n2) Confirm with Resume.;\

or

mapkey(continued) @MANUAL_PAUSESelect Table then Resume to place;\

mapkey(continued) ~ Command `ProFileSelPushOpen@context_dlg_open_cmd` ;@PAUSE_FOR_SCREEN_PICK;\

But if you desire to insert random "verbage" midstream, I don't think it will happen unless there is an input box that you can pause at. I have not found a way yet but it doesn't mean it can not be done.

dschenken
21-Topaz I
(To:dbower1)

I don't think you can. You can call a second mapkey at the end of the first and have comments between them and as part of the mapkey definition, which will show up in the mapkey window, using the label command: mapkey imaf @MAPKEY_NAMExxxxxxx @MAPKEY_LABELxxx;\

OTOH mapkey execution ignores inputs that don't match currently available commands, but I don't recall offhand if they terminate at the failure or just keep interpreting until they hit something that works. If they do continue then adding a line like:

mapkey(continued) ~this comment might just work;\ might just work.

You can also display a comment if you use a .txa file that you can run from a mapkey using the Prompt command.

Prompt `prompt number

Description
Displays a prompt message in the Message Window. The number argument is the number of blocks in the trainer's text file.

Example
`prompt 77

Or you can do as I do and create a Wiki page that contains annotation about how the mapkey works, but you need to have a Wiki to do so. Maybe Excel or Word would work.

Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags