Have a Question?
Print

00023: Advanced examples for loading function keys

Title:

Advanced examples for loading function keys

Description:

Loading F5 to call _EDIT: 

>10 DEF FNSTR$(STR$)=CHR(LEN(STR$))+STR$ 
>20 PRINT ‘FL’+”2″+$04$+FNSTR$(“CALL””_edit”””+$0D$) 


Loading F6 to ‘call “_ascii”,”pe.com”‘, type: 

>10 DEF FNSTR$(STR$)=CHR(LEN(STR$))+STR$ 
>30 PRINT ‘FL’+”2″+$05$+FNSTR$(“CALL””_ascii””,””pe.com”””+$0D$) 


To load the right arrow key with “print ‘cs'”, type: 

>PRINT ‘EL’+”2″+$01$+CHR(11)+”PRINT ‘CS'”+$0D$ 


To load the left arrow key with “ABC”, type: 

>PRINT ‘EL’+”2″+CHR(0)+CHR(3)+”ABC” 


To load the right arrow key with “Z”, type: 

>PRINT ‘EL’+”2″+CHR(1)+CHR(1)+”Z” 


To load F7 with a Unix operating system command such as “who”, type: 

Loading F5 to call _EDIT: 

>10 DEF FNSTR$(STR$)=CHR(LEN(STR$))+STR$ 
>20 PRINT ‘FL’+”2″+$04$+FNSTR$(“CALL””_edit”””+$0D$) 


Loading F6 to ‘call “_ascii”,”pe.com”‘, type: 

>10 DEF FNSTR$(STR$)=CHR(LEN(STR$))+STR$ 
>30 PRINT ‘FL’+”2″+$05$+FNSTR$(“CALL””_ascii””,””pe.com”””+$0D$) 


To load the right arrow key with “print ‘cs'”, type: 

>PRINT ‘EL’+”2″+$01$+CHR(11)+”PRINT ‘CS'”+$0D$ 


To load the left arrow key with “ABC”, type: 

>PRINT ‘EL’+”2″+CHR(0)+CHR(3)+”ABC” 


To load the right arrow key with “Z”, type: 

>PRINT ‘EL’+”2″+CHR(1)+CHR(1)+”Z” 


To load F7 with a Unix operating system command such as “who”, type: 

>0010 DEF FNX$(X$)=CHR(LEN(X$))+X$ 
>0020 PRINT ‘FL’,”2″,$06$,FNX$(“A=SCALL(“”who””)”+$0D$) 


To load F8 with a *NIX operating system command such as “lf”, type: 

>0010 DEF FNSTR$(STR$)=CHR(LEN(STR$))+STR$ 
>0020 PRINT ‘FL’,”2″,$07$,FNSTR$(“A=SCALL(“”lf””)”+$0D$) 


To load F9 with a DOS operating system command such as “dir”, type: 

>10 DEF FNSTR$(STR$)=CHR(LEN(STR$))+STR$ 
>20 PRINT ‘FL’,”2″,$08$,FNSTR$(“A=SCALL(“”DIR””)”+$0D$) 


Load Shift-F12 so it clears the screen 

0010 PRINT ‘FL’+”2″+CHR(23)+CHR(11)+”print ‘rs'”+$0D$ 

The chr(23) is the shift-F12 key 
The chr(11) is the length of the string to load the key with (11 chars)>0010 DEF FNX$(X$)=CHR(LEN(X$))+X$ 
>0020 PRINT ‘FL’,”2″,$06$,FNX$(“A=SCALL(“”who””)”+$0D$) 


To load F8 with a Unix operating system command such as “lf”, type: 

>0010 DEF FNSTR$(STR$)=CHR(LEN(STR$))+STR$ 
>0020 PRINT ‘FL’,”2″,$07$,FNSTR$(“A=SCALL(“”lf””)”+$0D$) 


To load F9 with a DOS operating system command such as “dir”, type: 

>10 DEF FNSTR$(STR$)=CHR(LEN(STR$))+STR$ 
>20 PRINT ‘FL’,”2″,$08$,FNSTR$(“A=SCALL(“”DIR””)”+$0D$) 


Load Shift-F12 so it clears the screen 

0010 PRINT ‘FL’+”2″+CHR(23)+CHR(11)+”print ‘rs'”+$0D$ 

The chr(23) is the shift-F12 key 
The chr(11) is the length of the string to load the key with (11 chars) 



Last Modified: 12/19/1997 Product: PRO/5 Operating System: All platforms

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top