'This scripts adds or deletes text to/from a new channel or to /from the keyboard channel var neuerKanal, neuerKanal2,test,finalxode%[4],finalcode$,kode%,n,x, ein$,links$, rest$, kode, neu, kode2, finalkode; neuerKanal:=31; 'declare toolbar ToolbarClear(); ToolbarSet(1, "delete text", deltext%); ToolbarSet(2, "add text", addtext%); ToolbarSet(3, "end", ende%); repeat Toolbar("",1023); until 0; Halt; func addtext%() 'add text to marker channel Cursordelete(-1); Cursornew(); interact("position cursor to desired textposition",1023); neuerKanal2:=input("read from which channel? (0 makes new channel)",31,0); 'where should we got thze info from? if neuerKanal2=0 then neuerKanal2:=memchan(5); endif; ein$:=input$("enter text you want to write to the channel", ein$); 'text input n:=len(ein$); 'measure length of text 'Printlog(n); neu:=Memchan(5); ' create Memchan Memimport(neu,neuerKanal2,0,maxtime()); 'import from keyboard channel chanshow(neu);'show chan for x:= 1 to n do rest$:=mid$(ein$,x,1); 'find letters in string kode:=asc(rest$); ' and make it ASC code ArrAdd(finalxode%[2:2],00);'array must be integer!!! ArrAdd(finalxode%[0:1],kode);'schreibt in ASC Code!!!!!! Fucking shit help function of spike 2! Memsetitem(neu,0, Cursor(1)+x/5,finalxode%[]);'write to memchan Arrconst(finalxode%[],0);'empty array next;'go for next letter if neuerkanal2>400 then ChanDelete(neuerkanal2); endif; 'neuerKanal:=input("write to which channel, 0 for writing to memory channel",31,0); 'if neuerKanal>0 then ' if >0 then write to real channel 'memsave(neu,neuerKanal); 'chandelete(neu); 'chanshow(neuerKanal); 'chantitle$(neuerKanal,"keyboard"); 'else chanshow(neu); 'if 0 then show memory channel 'chantitle$(neu,"keyboard"); 'endif; draw(); end; func deltext%() 'delete text from marker channel neu:=memchan(5); Cursordelete(-1); Cursornew();Cursornew(); interact("set Cursors around area to delete text from keyboard channel", 1023); Cursorrenumber(); neuerKanal2:=input("read from which channel?(0 makes new channel)",31,0); if neuerKanal2=0 then neuerKanal2:=memchan(5); endif; memimport(neu, neuerKanal2,0, Cursor(1)); 'import text from 0 to left Cursor memimport(neu, neuerKanal2, Cursor(2), maxtime()); ' import text from right Cursor to maxtime 'neuerKanal:=input("write to which channel, 0 for writing to memory channel",31,0); if neuerkanal2>400 then ' ChanDelete(neuerkanal2); endif; draw(); end; func ende%() halt; end;