Edit menu

 

 

This menu is also accessible by right clicking a command.  As well, the quick-click action buttons at the bottom of the main PgcEdit screen mirror the top part of this menu.

 

 

Edit Cmd (Spacebar):  Call the Command Editor for the current command (see below).  A command must be highlighted in the right hand pane first.  A shortcut is to double click the command.

 

Edit PGC (Enter/Return):  Call the PGC Editor for the current PGC selected in the left pane (see below).  A shortcut is to double click the PGC in the PGC Selector.

 

Add Before (Ctrl + Shift + <) and Add After (Ctrl + Shift + >):  Adds a NOP command before or after the selected command(s), which can then be edited.

 

Delete (Del):  Remove the selected commands.

 

Duplicate (Ctrl + d):  Duplicate the selected commands.

 

Copy (Ctrl + c), Append (Insert), Cut (Ctrl + x), Paste replace (Ctrl + v), Paste before (Shift + v) and Paste after (Ctrl + Shift + v):  Clipboard functions.

·         Append adds the selected commands to those already present in the clipboard

·         Paste replace replaces the selected commands by the contents of the clipboard

·         Paste before and Paste after add the commands on the clipboard before or after the selected commands.

Note:  If you copy and paste commands with CallSS to a domain which requires JumpSS (and vice versa), PgcEdit will automatically change the command to the correct syntax.

 

Decr GOTOs (Ctrl + minus sign) and Incr GOTOs (Ctrl + Plus sign):  increments by -1 or 1 the number of the target line of all the GoTo (and SetTmpPML) commands contained in the selection.

 

Move Up (Ctrl + [) and Move Down (Ctrl + ]):  Move the selected commands in the list.

 

Dupe and Increment (Ctrl + Shift + d):  This command enables you quickly and easily to duplicate commands and increment (or decrement) arguments where the commands are in a sequence.  Position the cursor on the last lines in the sequence and then execute this function.

For example:  Suppose you had 10 titles and had started off a PGC as follows:

1  if ( gprm(0) == 1 ) then { Goto line 3 }

2  if ( gprm(0) == 2 ) then { Goto line 4 }

3  (JumpTT) Jump to Title 1

4  (JumpTT) Jump to Title 2

First, position the cursor on line 4 and execute the function 8 times (experienced users may prefer to right click the Duplicate button in the main GUI, which is very fast but does not show the help screen).  Next, position the cursor on line 2 and repeat.

Your sequence might be more than a single command:

1  if ( gprm(9) != 1 ) then { Goto line 3 }

2  (JumpTT) Jump to Title 1

3  if ( gprm(9) != 2 ) then { Goto line 5 }

4  (JumpTT) Jump to Title 2

5  NOP

In this case, you would highlight lines 3 and 4 (as they are both part of the sequence) and execute the function.

If the results are not what you expected, you might need to temporarily deselect the Automatically Renumber GoTos button located on the toolbar.

It is highly recommended to read the help screen at least once.

If the function does not appear to be working, you should look for error messages highlighted in pink in the status bar.

 

Split Conditional Cmd (Ctrl + Shift + s):  This function splits a conditional command (except GoTos) to a combination of a conditional GoTo, the original command and an NOP command. This is useful if you wish to insert a chain of new conditional commands.

For example:

1 if ( gprm(14) >= 25 ) then { LinkPGN Program 7 }

becomes:

1 if ( gprm(14) < 25 ) then { Goto line 3 }
2 LinkPGN Program 7
3 NOP

You can also create unconditional branches of code by splitting a NOP.

This command may also be executed by right clicking the Move Down button.

 

Jump to Target (Ctrl + j):  If the currently selected line is a Goto, this function will select the destination line. If the current line is a Jump, Call, Link or Set + Link, the function will select the destination PGC.  The mouse shortcut for this function is to “middle click” the command.

 

Undo cmds changes (Ctrl + z):  Resets the current PGC commands to the original state.

Warning! This function is very limited – it only works for commands and the undo buffer is reset each time another PGC is displayed. This means that if you go to another PGC, the PGC you are leaving will lose its undo capabilities.  However, you can go to the scratchbook and return to the same PGC without losing the undo.

The scratchbook also has a limited undo function, as it can be reset to the Default Scratchbook (see Options → Save current scratchbook as default).

 

Copy as text:  Copies the currently selected commands as they appear in the main listbox to the clipboard.  The hex codes are copied with the text.  Commands copied this way can be pasted in a forum, and can also be pasted in PgcEdit.  This is a convenient way to publish code snippets on the Net.

 

Append to scratchbook (Ctrl + Insert):  Adds the selected commands to the scratchbook directly.  If you have defined more than one section in your scratchbook, you will have the option of choosing which section to add the commands to (or you may decide to add the commands to a new section).

 

Delete all commands:  Deletes all the commands in a PGC (but not the cell parameters).

 

Note:  The keyboard shortcuts only work when the main pane (containing the commands) is active.