Tags:
create new tag
view all tags

APPX Keystroke & Process Recording & Playback

The following information is only applicable when running APPX in character mode (ie, not using the APPX Desktop or HTML clients) or using the old Presentation Manager client (ie, running 'appx.exe -c' to connect to a remote server or running 'appx.exe' directly on the server).

APPX 3.x and up has the ability to record (and playback) Keystroke and Process logs. You can set up the environmental variable APPX_SCRIPT_OUT to record Keystrokes and Processes, as in the following example:

export APPX_SCRIPT_OUT=~/script.out

In WindowsNT, this would be:

set APPX_SCRIPT_OUT=c:\script.out

... which can be put into a batch file that invokes APPX, or set up as a global environment variable (before APPX Presentation Server is launched).

This creates a highly readable logfile of all Keystrokes and selected Process names executed, for a user's last exited APPX session. This logfile is placed in the user's home directory (~/script.out). When you reenter APPX, this logfile is initialized.

If you ask users to (1) take a screen snapshot, and (2) rename their *.out logfile to something else after exiting APPX, you will have a much better record of the circumstances surrounding user errors!

Also, you can copy ~/script.out to ~/script.in, edit this file to have it stop at a desired point, then ...

export APPX_SCRIPT_IN=~/script.in

... then run APPX, in order to replay the previously captured script APPX session.

The playback is actually running APPX, and performing the same actions that the user performed. The playback is not just a simulation, as in some products that have a playback feature. All of the data entry and posting and such will be re-run.

If the environment variable APPX_SCRIPT_STEP is not blank in script playback mode, APPX will pause before each option key is played. You must press a key to resume until the next APPX option key is to be sent. While paused, you can suspend the script, take over control of the keyboard and then resume the script.

While paused, you can press the following keys:

c continue running the script without stepping 
p pause, you take over the keyboard until you hit  OPT_MACRO (Ctrl-R). 
e end the script

Anything else will step through the script until the next Option would be played

You can substitute environment variables into a script using "#$name" where"name" is the name of an environment variable. You can use this as a way toautomate repetitive tasks such as data file management. For example, given the following script: ! Filename: restruct.apx
!
! Restructure a database/application
! set $ap to the name of the application
! set $db to the name of the database
!
#USER 4
#$db
#$ap
#RETURN
#USER 4
#END
#END
#END

You could restructure a database/application with the following Unix command line: $ APPX_SCRIPT_IN=restruct.apx ap=TAR db=MDB appx

Of course the easiest way to build this script would be to record the keystrokes and then edit in the environment variables for the text youwant to replace.

You can also use Ctrl-R to record ad-hoc scripts.

For additional information:

Using the APPX/TMUNIX Scripting Feature

This document provides further details about APPX Scripting and the specific Environment Variables that are involved.

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2016-02-18 - JeanNeron
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback