Einzelnen Beitrag anzeigen
Alt 12.10.2012, 01:47   #139
leecher
Moderator
KEYSTUFF

E r g e b n i s / R e s u l t

Put a function key in the keyboard buffer.

B e s c h r e i b u n g / D e s c r i p t i o n

This procedure places a function key in the keyboard buffer for you. You
must specify the key to be inserted.

Function keys F1..F10 and Esc may be inserted along with Alt F1 to F10,
Shift F1 - F10 and numerous other cursor keys.

Using this function with STRSTUFF lets you write macros from inside
your programs.

S y n t a x

Code:
bool = call('KEYSTUFF' , key_value)
P a r a m e t e r

key_value - This procedure accepts an integer value.

0 = <undo:esc>
1 = <help:F1>
2 = <menu:F2>
3 = <print:F3>
4 = <search:F4>
5 = <copy:F5>
6 = <change:F6>
7 = <paste:F7>
8 = <desk:F8>
9 = <select:F9>
10 = <do:F10>

11 = <hypertext:Alt F1>
12 =
13 = <printscreen:Alt F3>
14 = <ascii:Alt F4>
15 = <cut:Alt F5>
16 = <format:Alt F6>
17 = <place:Alt F7>
18 = <macro:Alt F8>
19 = <deselect:Alt F9>
20 = <execute:Alt F10>

21 = <user1:Shift F1>
22 = <user2:Shift F2>
23 = <user3:Shift F3>
24 = <user4:Shift F4>
25 = <user5:Shift F5>
26 = <user6:Shift F6>
27 = <user7:Shift F7>
28 = <user8:Shift F8>
29 =
30 =

31 = <backspace>
32 = <tab>
33 = <backtab>
34 = <up>
35 = <down>
36 = <left>
37 = <right>
38 = <home>
39 = <end>
40 = <line_start>
41 = <line_end>
42 = <word_forward>
43 = <word_backward>
44 = <page_up>
45 = <page_down>
46 = <insert>
47 = <delete>
48 = <line_insert>
49 = <line_delete>
50 = <return>

If you want to place several keys in the keyboard buffer,
then you must 'KEYSTUFF' them in reverse order. The
keyboard buffer is a LIFO stack - Last in, First Out.

To call up the print window and print, you would normally
type F3, F10. Using this routine, you would stuff F10 and
then F3. At the next pause for keyboard input the
'keystuffed' keys take effect.

R e t u r n s

The procedure returns a Boolean or True/False value.

TRUE - the procedure worked correctly.
FALSE - a problem occurred.

B e i s p i e l / E x a m p l e

Code:
! get the keyboard utilities 
attach 'KEYBOARD'
! force the ascii table to appear - Alt F4
x = call ('KEYSTUFF' , 14)
! remove the utilities from memory
detach 'KEYBOARD'
Q u e r v e r w e i s / C r o s s R e f e r e n c e
GET_CH Get character without echoing it to the screen.
GET_CHE Get a character with echo.
FLUSHBUF Clear out the keyboard buffer.
STRSTUFF Place a string in the keyboard buffer.
leecher ist offline   Mit Zitat antworten