![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm a Pick newbie, using D3. I've figured out how to write macros, but I'm stuck trying to figure out how to best paginate their output. I figured the easiest approach was to stick some sort of input statement into the macro to wait for a keystroke after each screenful. While I couldn't find a way to do this directly from the macro, I wrote a short 'waitforchar' BASIC program which works fairly well: waitforchar 001 * Wait for one character to be entered 002 PRINT "Press a key to continue: ": 003 IN CHARACTER 004 STOP It's used in a macro like this sample-macro 001 N 002 ...produce first screen of data... 003 run bp waitforchar 004 ...produce second screen of data... 005 run bp waitforchar 006 ...etc... Is there a better way to paginate macro output? I notice that many of the system commands in the dm account are implemented in BASIC, but have some sort of 'wrapper' around them. What is the function of this wrapper -- I haven't been able to decipher it? For example, the 'list-users' command in the dm account seems to be defined as shown below in "dm,,", and the BASIC code for the command is located in "dm,bp,". list-users 001 VR 002 3 9 003 F 004 dm,bp, list-users How do I interpret this definition, line-by-line? Line #2 appears to contain a multivalued entry, if I'm reading it correctly. How to you enter these using the Editor or Update processor? 'list-item' displays line 2 as: 002 3]9 Any help would be appreciated... |
#3
| |||
| |||
|
#4
| |||||
| |||||
|
|
I'm a Pick newbie, using D3. |
|
I've figured out how to write macros, but I'm stuck trying to figure out how to best paginate their output. |
|
I figured the easiest approach was to stick some sort of input statement into the macro to wait for a keystroke after each screenful. While I couldn't find a way to do this directly from the macro, I wrote a short 'waitforchar' BASIC program which works fairly well: waitforchar 001 * Wait for one character to be entered 002 PRINT "Press a key to continue: ": 003 IN CHARACTER 004 STOP It's used in a macro like this sample-macro 001 N 002 ...produce first screen of data... 003 run bp waitforchar 004 ...produce second screen of data... 005 run bp waitforchar 006 ...etc... Is there a better way to paginate macro output? |
|
I notice that many of the system commands in the dm account are implemented in BASIC, but have some sort of 'wrapper' around them. What is the function of this wrapper -- I haven't been able to decipher it? |
|
For example, the 'list-users' command in the dm account seems to be defined as shown below in "dm,,", and the BASIC code for the command is located in "dm,bp,". list-users 001 VR 002 3 9 003 F 004 dm,bp, list-users How do I interpret this definition, line-by-line? Line #2 appears to contain a multivalued entry, if I'm reading it correctly. How to you enter these using the Editor or Update processor? 'list-item' displays line 2 as: 002 3]9 Any help would be appreciated... |
![]() |
| Thread Tools | |
| Display Modes | |
| |