•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The GFA-Basic Compendium
Author      : GFA Systemtechnik GmbH
Version     : GFABasic.HYP v2.98 (12/31/2023)
Subject     : Documentation/Programming
Nodes       : 899
Index Size  : 28056
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Document not found
@help       : Help
@options    : +g -i -s +z
@width      : 75
@hostname   : STRNGSRV
@hostname   : CAB     
@hostname   : HIGHWIRE
@hostname   : THING   
View Ref-FileAPPL_TPLAY(num,speed,mem)
APPL_TRECORD(mem,num)

num, speed, mem: iexp

APPL_TRECORD() makes a record of user activities (mouse movement, key presses,
etc.), and APPL_TPLAY() plays it back at a specified speed (speed = 1 to 1000).
These functions do not work as specified in some older documentation.

With newer ROM versions these functions work approximately as specified, except
that instead of 6 bytes per event 8 bytes are used and also the speed factor
works differently. Everything else appears reliable, but these functions should
be used advisedly.

    num   - Number of events to record or playback.
              Thus 8 events would require a buffer 64 (8*8) bytes in size.
    speed - Playback speed. (1-1000)
              200 = Double speed
              100 = Normal speed
              50  = Half speed
              Other values are interpreted accordingly.
    mem   - Address of an array of EVNTREC structures for recording or
            playback. Each EVNTREC structure is 8 bytes (2 longs).
              Data format: <event><value>,<event><value>,<event><value>,...
              Name                Event     Value
              ------------------  --------  -------------------------------
              0 APPEVNT_TIMER     Timer     Elapsed time in milliseconds
              1 APPEVNT_BUTTON    Button    high word = number of clicks
                                            low word  = state (1 = down)
              2 APPEVNT_MOUSE     Mouse     high word = X position
                                            low word  = Y position
              3 APPEVNT_KEYBOARD  Keyboard  bits 0-7   = ASCII code
                                            bits 8-15  = scan code
                                            bits 16-31 = modifier key state

Note: See kbshift() for modifier key state.

    Example:

    x&=100
    y&=100
    INLINE adr%,8
    LONG{adr%}=2
    LONG{adr%+4}=OR(SHL(x&,16),y&)
    ~APPL_TPLAY(1,100,adr%)

--> The mouse cursor jumps to coordinates 100,100

Memo: The parameters for APPL_TPLAY() are documented incorrectly in the
      GFA manual. Parameter order does not match official docs.
      APPL_TPLAY() does not work compiled as the library contains a bug.

appl_tplay()+, appl_trecord()+, Kbshift()+