Einzelnen Beitrag anzeigen
Alt 13.10.2012, 11:28   #169
leecher
Moderator
CHARKEY

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

Checks for a character in the keyboard buffer and returns it

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

This function checks if there is a character waitinig in the keyboard buffer. If so, it is returned, otherwise an empty string is returned.

S y n t a x

Code:
ckey = call('charkey')
P a r a m e t e r

R e t u r n s

A string with containing the character.
The string ~~~ is returned if K_UNDO (ESC) is pressed
The string ||| is returned if K_DO (F10) or K_RETURN (Return) is pressed

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

Code:
attach "keybuff"
xpos = 10 
ckey = "" 
while ckey <> "~~~" and ckey <> "|||" and xpos < 30 
   ckey = call('charkey')
   if  ckey <> "" and ckey <> "~~~" and ckey <> "|||" 
       put at xpos,7 ckey
       xpos = xpos + 1 
       put at xpos+1,7 " " 
   end if 
end while
Angehängte Dateien
Dateityp: oac KEYBUFF.OAC‎ (14.0 KB, 2x aufgerufen)
Dateityp: txt KEYBUFF.TXT‎ (1.2 KB, 2x aufgerufen)
leecher ist offline   Mit Zitat antworten