|
|
#141 |
|
Moderator
|
PAUSE
E r g e b n i s / R e s u l t
Pause the program B e s c h r e i b u n g / D e s c r i p t i o n Pauses the computer for 0.5 seconds. This function once allowed users to specify the pause but when SPI released OA4 they broke something. Calling the function crashed Open Access, so we have altered the function to pause for a fixed period of time. Call Pause repeatedly to get longer pauses. This is useful when displaying a copyright message for a fixed amount of time. Follow a pause with a keyboard buffer flush as the user might have pressed a key in impatience. S y n t a x Code:
bool = call('PAUSE')There are no parameters for this procedure 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:
attach 'KEYBOARD'
! this code displays a message and pauses the computer for 2 seconds
! then it clears the keyboard buffer as the user might have hit a key
put 'Copyright 1996 XYZ Corp'
x = call ("PAUSE")
x = call ("PAUSE")
x = call ("PAUSE")
x = call ("PAUSE")
x = call ("FLUSHBUF")
detach 'KEYBOARD'FLUSHBUF |
|
|
|
|
|
#142 |
|
Moderator
|
STRSTUFF
E r g e b n i s / R e s u l t
Place a character string 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 character string in the keyboard buffer. This allows the programmer to force or suggest strings into fields. It might also be used in the place of a macro. An application would fail if an essential macro is missing. The strstuff routine could provide macro functionality without the need to carry around additional files. S y n t a x Code:
bool = call ('STRSTUFF' , string)string - The single parameter passed to strstuff is a string. This string is passed directly to the keyboard buffer. The maximum length string is 64 characters long. R e t u r n s The procedure returns a Boolean or True/False value. TRUE - the string was placed in the keyboard board. FALSE - the procedure failed B e i s p i e l / E x a m p l e Code:
! load the keyboard utilities
attach 'KEYBOARD'
! call the strstuff procedure
x = call ('STRSTUFF' , 'Engulf and Devour plc') ;
a = ''
get a ! a is filled with the string 'Engulf and Devour plc'
! remove the utility from memory
detach 'KEYBOARD'GET_CH Get character without echoing it to the screen. GET_CHE Get a character with echo. FLUSHBUF Clear out the keyboard buffer. KEYSTUFF Place a function key in the keyboard buffer. |
|
|
|
|
|
#143 |
|
Moderator
|
MOUSE_HI
E r g e b n i s / R e s u l t
Hide the mouse cursor 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 turns off the mouse cursor. S y n t a x Code:
bool = call ('MOUSE_HI')There are no parameters for this procedure R e t u r n s A boolean value B e i s p i e l / E x a m p l e Code:
attach 'MOUSE'
a = call ('MOUSE_HI') ! turns off the mouse cursor
detach 'MOUSE'MOUSE_SH |
|
|
|
|
|
#144 |
|
Moderator
|
MOUSE_PR
E r g e b n i s / R e s u l t
Is a mouse present ? B e s c h r e i b u n g / D e s c r i p t i o n The MOUSE_PR function checks for the presence of a Microsoft or compatible mouse. S y n t a x Code:
present = call('MOUSE_PR')There are no parameters for this procedure R e t u r n s A boolean value is returned. TRUE - a mouse is present FALSE - no mouse was found B e i s p i e l / E x a m p l e Code:
attach 'MOUSE'
a = call ('MOUSE_PR') ! a contains TRUE if a mouse is present
detach 'MOUSE' |
|
|
|
|
|
#145 |
|
Moderator
|
MOUSE_SH
E r g e b n i s / R e s u l t
Turns on the mouse cursor 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 displays the text mouse cursor. This is a solid block whose colour is XORed to the background, ensuring it is always visible. S y n t a x Code:
bool = call ('MOUSE_SH')There are no parameters for this procedure R e t u r n s A boolean value B e i s p i e l / E x a m p l e Code:
attach 'MOUSE'
a = call ('MOUSE_SH') ! turns on the mouse cursor
detach 'MOUSE'MOUSE_HI |
|
|
|
|
|
#146 |
|
Moderator
|
MOUSE_ST
E r g e b n i s / R e s u l t
Give the mouse status (position, buttons pressed) B e s c h r e i b u n g / D e s c r i p t i o n The mouse status function returns details of the current mouse position and the status of either button. Because of the limitations of the C Hook interface, only one parameter may be returned to the calling program. So the x,y co-ordinate and the button status is rolled up into one return parameter. S y n t a x Code:
status = call ('MOUSE_ST')There are no parameters for this procedure R e t u r n s An integer value is returned. The button status is multiplied by 10,000. So, button 1 would be 10,000, button 2, 20,000 and buttons 1 and 2 pressed together would be 30,000. Added to this is the vertical co-ordinate, multiplied by 100. The vertical co-ordinate runs from 0 to 24. Lastly, the horizontal co-ordinate is added to the status. This co-ordinate runs from 0 to 79. So, the mouse in the top, left corner, with no buttons pressed would return 0. The mouse in the lower, right corner with the left button pressed would return - 1 * 10,000 + 24 * 100 + 79 = 12,479 B e i s p i e l / E x a m p l e Code:
attach 'MOUSE'
b = call('MOUSE_SH') ! display the mouse cursor
a = 0
while a < 30000 ! end the loop when both buttons are pressed
b = call ('MOUSE_ST') ! get the current mouse status
if a <> b
a = b
put a , do newline ! print the mouse status
end if
end while
b = call('MOUSE_HI') ! turn off the mouse cursor
detach 'MOUSE' |
|
|
|
|
|
#147 |
|
Moderator
|
GETAPP
E r g e b n i s / R e s u l t
Return the default appointments filename B e s c h r e i b u n g / D e s c r i p t i o n The function returns the searching order and filename of the current appointments file. Using this function, the developer could record the current filename prior to changing it with the SETAPP function. S y n t a x Code:
string = call('GETAPP')There are no parameters for this procedure R e t u r n s A string variable. B e i s p i e l / E x a m p l e Code:
attach 'SETUP'
a = call ('GETAPP') ! a would contain something like DATA:APPTSPI.DF
detach 'SETUP'SETAPP |
|
|
|
|
|
#148 |
|
Moderator
|
GETBUS
E r g e b n i s / R e s u l t
Return the default business cards filename B e s c h r e i b u n g / D e s c r i p t i o n The function returns the searching order and filename of the current business cards file. Using this function, the developer could record the current business cards name prior to changing it with the SETBUS function. S y n t a x Code:
string = call('GETBUS')There are no parameters for this procedure R e t u r n s A string variable. B e i s p i e l / E x a m p l e Code:
attach 'SETUP'
a = call ('GETBUS') ! a would contain something like DATA:CARDSPI.DF
detach 'SETUP'SETBUS |
|
|
|
|
|
#149 |
|
Moderator
|
GETCOL
E r g e b n i s / R e s u l t
Get an Open Access colour value B e s c h r e i b u n g / D e s c r i p t i o n The GETCOL function returns the current value of one of the 19 separate Open Access colours. The primary use of this routine is seen as recording a colour value before the SETCOL function changes it. In this way a developer might record the user's current colour scheme and then change it completely. When the program finishes, the colours can be reset to their original values. S y n t a x Code:
value = ('GETCOL' , colour)colour - The colour parameter selects the colour value to return. There are 19 colours, numbered 0 to 18. They are - 0 Normal colour 1 Errors 2 Title 3 Prompt 4 Input fields 5 User 1 colour 6 User 2 7 Borders 8 WP normal 9 WP bold 10 WP underline 11 WP bold underline 12 WP italics 13 WP bold italics 14 WP underline italics 15 WP bold underline italics 16 Menu Items 17 Menu Bar 18 Chosen Menu item R e t u r n s An integer value corresponding to the colour scheme. B e i s p i e l / E x a m p l e Code:
attach 'SETUP'
put call('GETCOL' , 2) ! prints the current value of the TITLE colour
detach 'SETUP'SETCOL |
|
|
|
|
|
#150 |
|
Moderator
|
GETDATE
E r g e b n i s / R e s u l t
Get the current Open Access date format B e s c h r e i b u n g / D e s c r i p t i o n This routine returns the current Open Access date format as a number. This allows the developer to record and check the current date format before changing it, using the SETDATE function. S y n t a x Code:
value = call ('GETDATE')There are no parameters for this procedure R e t u r n s An integer value indicating the current date format. 0 = mm-dd-yyyy 3 = mm.dd.yyyy 6 = mm/dd/yyyy 1 = dd-mm-yyyy 4 = dd.mm.yyyy 7 = dd/mm/yyyy 2 = yyyy-mm-dd 5 = yyyy.mm.dd 8 = yyyy/mm/dd B e i s p i e l / E x a m p l e Code:
attach 'SETUP'
put call('GETDATE') ! prints the value of the current date format
detach 'SETUP'SETDATE |
|
|
|