; English forum: http://www.purebasic.fr/english/viewtopic.php?t=8290&highlight= ; Author: Andre (combined examples of PB + Kale) ; Date: 12. November 2003 ; OS: Windows ; Demo: Yes ; PRoblem: keine Debug-Ausgabe und das Programm beendet sich auch nicht selbständig Dim MyArray$(9999) #UseAPI = 0 ; set to 1, if you would like to use the WinAPI commands (not limited to 64K Strings) CompilerIf #UseAPI=1 OpenClipboard_(#Null) If IsClipboardFormatAvailable_(#CF_TEXT) <> 0 hStrPtr.l = GetClipboardData_(#CF_TEXT) If hStrPtr <> 0 ;Display the first 30 characters of the Clipboard text! Debug PeekS(hStrPtr, 30) Else Debug "There are no centents in the clipboard!" EndIf EndIf CloseClipboard_() CompilerElse a$=GetClipboardText() ; Crashes if clipboard holds >64K! CompilerEndIf CompilerIf #UseAPI=0 If a$="" : Debug "There are no contents in the clipboard!" : End : EndIf CompilerEndIf Repeat r=FindString(a$,Chr(13)+Chr(10),1) If r<>0 num+1 : MyArray$(num)=Left(a$,r-1) : a$=Mid(a$,r+2,64000) EndIf Until r=0 For r=1 To num Debug MyArray$(r) Next ; IDE Options = PureBasic v4.02 (Windows - x86) ; Folding = -