The documentation from version 39.5.17 of PLANTA project can be found in the new PLANTA Online Help.

Macro Commands

Attention
  • In this topic, the macro commands and functions from PPMS (Releases 3.8 and <3.8) are listed.
  • Not all of these functions are supported in PLANTA project.
  • In PLANTA project, it is recommended to customize a Python Macro instead of macro lines.

PPMS macro commands that can be illustrated with Python

From S 39.5.12

Command Description Value
MOD Opening a module/macro open_module(MODULE_ID)
MSG ON Output of a dialog message ui_message_id()
MSG OFF Hides dialog messages  
DATA Adds a value to the active data field DataField class and its methods: set_raw_value(value) and set_text_value(value)
DATAV Expands the value of a variable and writes it in the active data field For reading out the variable: uvar_get()=
For writing =DataField class
and its methods: set_raw_value(value) and set_text_value(value)
ECHO ON/OFF Activates/deactivates the output of macro commands in the client NEW echo_enabled(), NEW echo_disabled()
LOOP/END LOOP Starts/quits a loop Python language constructions like if or for
MENU Opens a menu item menu() Method of the Module class
REPLY Answers an opened message box by specifying the number of the button  
SETV Replaces a variable with the specified value uvar_set()
SETVXY Replaces a variable with the value from the specified data field uvar_set() and methods of the Data field class
SETT Adds the defined character string to the module title set_title_suffix() method of the Module class
TRACE ON1 Starts chase. Displays every macro command in the dialog message. The macro command can be executed or not executed, or the entire macro execution can be canceled at a particular point.  
TRACE OFF End chase  
WAIT Waits for the specified number of seconds before executing each macro command

sleep(n)

Python language construction

Up to S 39.5.12

Command Description ValueSorted ascending
DATA Adds a value to the active data field DataField class and its methods: set_raw_value(value) and set_text_value(value)
ECHO ON/OFF Activates/deactivates the output of macro commands in the client echo_on(), echo_off()
DATAV Expands the value of a variable and writes it in the active data field For reading out the variable: uvar_get()=
For writing =DataField class
and its methods: set_raw_value(value) and set_text_value(value)
MENU Opens a menu item menu() Method of the Module class
MSG OFF Hides dialog messages  
REPLY Answers an opened message box by specifying the number of the button  
TRACE ON1 Starts chase. Displays every macro command in the dialog message. The macro command can be executed or not executed, or the entire macro execution can be canceled at a particular point.  
TRACE OFF End chase  
MOD Opening a module/macro open_module(MODULE_ID)
LOOP/END LOOP Starts/quits a loop Python language constructions like if or for
SETT Adds the defined character string to the module title set_title_suffix() method of the Module class
WAIT Waits for the specified number of seconds before executing each macro command

sleep(n)

Python language construction

MSG ON Output of a dialog message ui_message_id()
SETV Replaces a variable with the specified value uvar_set()
SETVXY Replaces a variable with the value from the specified data field uvar_set() and methods of the Data field class

Illustrate Further Functions

  • Which menu items in macros can be used by PLANTA project in the customizer? And how does that work?
    • For further information, click here. A customizing example for MENU154 can be found here.
  • How do I customize a dialog message with answer (button type = 5, MSG ON 36000047, LOOP @G1==1, LOOP @G1==2, etc.)?
    • For further information, click here.
  • How does the adjustment/creation work in a technical auxiliary module? A target record is to be created with values from variables (e.g. @1) or from the source record.
    • For further information, click here.
  • How do adjustment/creation from a source record to a target record work in a technical auxiliary module if changes are to be made?
    • For further information, click here.
  • How are variables from data filled (e.g. SETVXY, SETV, and possibly SETF)?
    • For further information, click here.
  • How can a record be changed from variable contents, e.g. DATA constant assignment, DATAV assignment from variable?
    • For further information, click here.
  • How is ECHO OFF and ECHO ON used in the customizer by PLANTA project?
    • For further information, click here.
  • How is the content of column A copied to column B for marked records, analogously to MENU 304 in Release 37?
    • For further information, click here.
  • How are search criteria changed from a macro?
    • For further information, click here.

Macro Commands (<3.8)

Command Description Value
CONT During macro run, a message asks if it is to be continued. At this point, the user has the option to interrupt the macro (e.g. in the case of automatic deletion after data has been transferred.)  
DATA
  • Fills a value in a data field.
  • Requires, that an input field is already active, e.g. via the previous GOTO command.
<Input value>
DATAV Expands the value of a variable and writes it into a data field. <@ Variable>
DEBUG
  • Starts/quits a server logfile
  • Starts/quits the collection of statistical data
  • Depending on the value, DEBUG can activate/deactivate the recording of runtime data for each event or control the recording of the server logfile.
0 = Quits the logfile

1 = Starts the logfile

2 = Server logfile with additional information is activated.

PERF ON = Starts the collection of statistical data

PERF OFF = Quits the collection of statistical data.

DUMPSCREEN Prints the entire main window of the software into the specified file. Prerequisites for DUMPSCREEN:
  • The path specifications can be relative or absolute.
  • Word6 must be accessible via PATH (autoexec.bat).
  • In the start directory of pmsgui (i.e., where the pmsgui.ini file is located), an empty Word6 document wit the name pscreen.doc must be contained.
Path and file name, where the screenshots are to be stored.
ECHO OFF From this command on, all further macro commands are executed without output on the client.
  • Pressing ESC does not lead to abortion, regardless of the duration of the operations within the macro.
  • No status messages are displayed.
  • ECHO OFF also applies to all sub-macros that are opened in a macro.
  • During the macro run, the program client is locked for user input. The macro cursor is displayed.
Note:
  • Within a macro, the ECHO can also be activated and deactivated several times in order to, e.g., display dialogs for the user or prompt user decisions.
  • With the MSG ON and MSG OFF commands, a special activity display box can be customized, which is output immediately before the ECHO OFF. A description of how to handle this is provided with the function MSG ON and MSG OFF. This box does not contain any buttons, it is removed by the MSG OFF macro command or when the macro ends.
ECHO ON
  • The command cancels the suppression of output on the client. All subsequent macro commands are then visible to the user again.
 
END LOOP
  • Terminates a loop that was started with LOOP.
 
GOTO
  • You can only switch to existing input fields.
<Window> <Field number> Example: In Window 2, you want to jump to the third input field. Value input: 2 3 (two, space, three)
INBX
  • Enables the input of a value in the query field of a dialogbox.
  • Application: Operation when copying;
  • Example: division by: <Value>
<Value>
LOOP
  • Starts a loop
  • All macro commands are repeated from the LOOP command on, until the END-LOOP criterion is satisfied.
 
MENU
  • Every menu item can be carried out, i.e., also menu items that are deactivated in a module.
<Menu item ID>
MOD MODULE
  • Only modules that are contained in the user menu valid for the respective user. This way, the access right is considered.
  • MODULE can also carry out the value of a global variable.
    • This enables you to open modules which were previously read from a list using SETVXY.
<Module ID>
MSG ON
  • Output of dialog messages in a macro.
  • Dialogs and user decisions are thus customizable in software macros.
<Dialog message ID>
MSG OFF
  • This command only takes effect on dialog messages of the activity display box type (button type = 5). The respective box is closed by the MSG OFF command.
  • For regular dialog messages, MSG OFF is not used. The user responds to these message boxes by clicking OK, Yes, No, and Back.
 
REPLY
  • Responds to an opened message box. The number counts from left to right.
  • During the macro run, such boxes remain invisible.
<Button number> VALUES: 1=YES or OK 2=NO 3=HELP
SETV Replaces the value of the variable by the entry specified here: <Value>
  • Special case for list variables @L:
    • Replaces the content of the variable by the values separated by a comma:
      • SETV <@L variable> = a,b,c
  • SETV with the value @19=xxxx changes the user language for all modules that are subsequently carried out until user relogin or a similar command.
    • As a result, only the subsequently opened data and modules are displayed in the new language.
    • For I-texts in modules, the command only takes full effect after the module has been opened.
<Variable> = <Value>
SETVXY
  • Reads the value of a DF in a variable.
  • The variable contains the value of the y-th input field in the data area.
  • In contrast to GOTO, SETVXY also takes effect on ID and output fields.
  • SETVXY can only read from the first record of a data area
  • The position number of the DF is independent of the DF type.
@xxxx X Y example: You want to jump to the 5th field of the 3rd data area. Value input: 3 5 (three, space, five)
SETT
  • The character string created via SETT, can be used in
    • Module title
    • Print and print preview
    • Default file name when using a pdf printer
  • If the @ sign is to be displayed in the created character string, the sign must be used twice. Example: user@@domain.de
  • The character string created via SETT is saved in the @G54 global variable. The module title is saved in @G26.
  • SETT does not work if option modules are opened along
  • It is possible to extend the module title by the content of a global variable using SETT
<Text> <@Gxxx> <Text> <@Gyyy>...
STATISTIC Starts/terminates a short statistic. STATISTIC sets up a summary record for all events which occur between STATISTIC ON and STATISTIC OFF. This is shown by the event STATISTIC. ON = Starts statistic OFF = Terminates statistic
SUSPEND Suspends the macro execution until the user selects the Continue macro menu item. If another macro is called up manually while a macro is suspended, the suspended macro cannot subsequently be resumed.  
TRACE ON1
  • Starts chase
  • Help area for the error analysis in macro modules
  • Before each macro line is opened, a message is displayed
 
TRACE ON2 Starts a dialog message. Depending on the user input in the dialog message, the macro branches out.
  • YES = execution of the following line.
  • NO = jump to TRACE OFF
  • Back = suspend macro completely. Note:
  • This function is no longer used, dialog messages are opened with the MSG ON command.
 
TRACE OFF End chase  
WAIT Waits for the specified number of seconds before carrying out each macro command. This command can be deactivated by another WAIT command (e.g. WAIT 0). Can be used for self-executing presentations. <sec>
#
  • Using #, macro lines can be commented out, i.e., they are no longer addressed by the macro.
  • Enables you to insert arbitrary comments in a macro. The execution of the macro continues with the following command.
<Command>

Note

  • In the listbox of the Value data field, the menu items or the MENU values and their meaning are listed.

         PLANTA project









 
  • Suche in Topic-Namen

  • Suche in Topic-Inhalten
This site is powered by the TWiki collaboration platform Powered by Perl