home *** CD-ROM | disk | FTP | other *** search
EPOC OPL Source | 1999-08-29 | 1.6 KB | 50 lines |
-
-
- REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- REM ! !
- REM ! CLIPBOARD DEMO !
- REM ! !
- REM ! (c) 1999 M.O'Neill !
- REM ! !
- REM ! http://www.i27.com clipboard@i27.com !
- REM ! !
- REM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- REM **************************Start************************
- PROC start:
- LOADM "D:\System\OPM\Clipboard.OPM" REM load module
- Main:
- ENDP
-
- REM **************************Main*************************
- PROC Main:
- LOCAL c$(255)
-
- REM read the contents of the clipboard into c$...
- c$=CBClipboardRead$:
- IF LEN(c$)>253
- PRINT "!!Text too long, cropped to fit string!!"
- PRINT
- c$=LEFT$(c$,253)
- ENDIF
-
- REM display the results...
- PRINT "Clipboard contents:",CHR$(34)+c$+CHR$(34)
- PRINT "Length of text:",LEN(c$),"characters"
- PRINT
- PRINT "Press any key to copy",CHR$(34)+"test copy"+CHR$(34),"to the clipboard"
- PRINT
- GET
-
- REM write some text to the clipboard...
- CBClipboardWrite:("test copy")
-
- REM read clipboard again and finish
- c$=CBClipboardRead$:
- PRINT CHR$(34)+c$+CHR$(34),"copied to the clipboard,"
- PRINT "go to WORD and press CTRL+V to see for yourself!"
- GET
- ENDP
-
-
-