Entry
TSE: Clipboard: Named: Windows: Operation: Copy: How to copy to a named clipboard using a list?
Sep 13th, 2009 12:18
......... ....., Knud van Eeden, Thomus marcony, Hindusthan Jobs, engatoo engatoo, John Martin,
----------------------------------------------------------------------
--- Knud van Eeden --- 26 November 2006 - 03:49 am -------------------
TSE: Clipboard: Named: Windows: Operation: Copy: How to copy to a
named clipboard using a list?
===
Idea:
Each named Windows clipboard is stored in a buffer.
The name of that buffer is
++++< letter of your named clipboard >
e.g.
++++A is the buffername for named clipboard A
++++B is the buffername for named clipboard B
...
++++Z is the buffername for named clipboard Z
You go then trough all the named clipboards from A to Z and do
something
with the text in the corresponding buffer (e.g. copy to or paste from)
===
Usage:
The highligted block in your current file is copied to the named
clipboard
which you choose from the list (e.g. if you choose "B" from the list,
then the current block is copied to that named clipboard.
===
--- cut here: begin --------------------------------------------------
FORWARD INTEGER PROC FNClipboardCreateWClipboardNamedI( STRING s1 )
FORWARD INTEGER PROC FNClipboardGetWBufferNamedSimpleI( STRING s1 )
FORWARD INTEGER PROC FNClipboardGotoWBufferNamedSimpleB( STRING s1 )
FORWARD PROC Main()
FORWARD PROC PROCClipboardInsertCopyWNamedLetterListSimple( STRING s1,
STRING s2 )
FORWARD PROC PROCClipboardInsertWCopyNamedLetter( STRING s1 )
FORWARD STRING PROC FNClipboardGetWNamedLetterListSimpleS( STRING s1,
STRING s2 )
FORWARD STRING PROC FNStringGetWClipboardBufferNamedFilenameSimpleS(
STRING s1 )
FORWARD STRING PROC FNStringGetWLineFileBeginClipboardNamedS( STRING
s1 )
// --- MAIN --- //
PROC Main()
PROCClipboardInsertCopyWNamedLetterListSimple( "A", "Z" )
END
<F12> Main()
// --- LIBRARY --- //
// library: clipboard: insert: copy: w: named: letter: list: simple
(filenamemacro=insecllv.s) [kn, ri, su, 26-11-2006 02:39:52]
PROC PROCClipboardInsertCopyWNamedLetterListSimple( STRING
letterBeginS, STRING letterEndS )
// e.g. PROC Main()
// e.g. PROCClipboardInsertCopyWNamedLetterListSimple( "A", "Z" )
// e.g. END
// e.g.
// e.g. <F12> Main()
STRING s[255] = ""
PushPosition()
PushBlock()
CopyToWinClip()
s = FNClipboardGetWNamedLetterListSimpleS( letterBeginS, letterEndS )
PROCClipboardInsertWCopyNamedLetter( s )
PopBlock()
UnMarkBlock()
PopPosition()
END
// library: clipboard: get: w: named: letter: list: simple
(filenamemacro=getcllsj.s) [kn, ri, su, 26-11-2006 02:41:07]
STRING PROC FNClipboardGetWNamedLetterListSimpleS( STRING
letterBeginS, STRING letterEndS )
// e.g. PROC Main()
// e.g. Message( FNClipboardGetNamedLetterListSimpleS
( "A", "Z" ) ) // returns letter of named clipboard you choose from
list with content of all named clipboards
// e.g. END
// e.g.
// e.g. <F12> Main()
STRING s[255] = ""
STRING resultS[255] = ""
STRING clipboardS[255] = ""
INTEGER bufferResultIdI = CreateTempBuffer()
INTEGER minI = ASC( letterBeginS )
INTEGER maxI = ASC( letterEndS )
INTEGER I = minI - 1
INTEGER stopB = FALSE
INTEGER maxB = FALSE
REPEAT
I = I + 1
s = CHR( I )
maxB = ( I >= maxI )
clipboardS = s + " " + FNStringGetWLineFileBeginClipboardNamedS( s )
AddLine( clipboardS, bufferResultIdI )
stopB = maxB
UNTIL ( stopB )
GotoBufferId( bufferResultIdI )
IF ( List( "Clipboard: Name: Overview", 100 ) <> 0 )
resultS = GetText( 1, 1 )
ENDIF
AbandonFile( bufferResultIdI )
RETURN( resultS )
END
// library: clipboard: insert: w: copy: named: letter
(filenamemacro=inseclnn.s) [kn, ri, su, 26-11-2006 02:48:38]
PROC PROCClipboardInsertWCopyNamedLetter( STRING s )
// e.g. PROC Main()
// e.g. PROCClipboardInsertWCopyNamedLetter( "A" )
// e.g. END
// e.g.
// e.g. <F12> Main()
INTEGER bufferIdI = 0
PushPosition()
bufferIdI = FNClipboardGotoWBufferNamedSimpleB( s )
bufferIdI = bufferIdI // to avoid warning that it is not used when
compiling
IF ( bufferIdI == 0 )
bufferIdI = FNClipboardCreateWClipboardNamedI( s )
GotoBufferId( bufferIdI )
ENDIF
MarkLine( 1, NumLines() )
KillBlock()
PasteFromWinClip()
PopPosition()
END
// library: string: get: w: line: file: begin: clipboard: named
(filenamemacro=getstcnf.s) [kn, ri, su, 26-11-2006 02:41:35]
STRING PROC FNStringGetWLineFileBeginClipboardNamedS( STRING
letterClipboardS )
// e.g. PROC Main()
// e.g. Message( FNStringGetLineFileBeginClipboardNamedS( "A" ) ) //
gives e.g. the content of named clipboard "A", get first line, and
return this line in a string
// e.g. END
// e.g.
// e.g. <F12> Main()
INTEGER bufferIdI = 0
STRING s[255] = ""
PushPosition()
PushBlock()
bufferIdI = FNClipboardGotoWBufferNamedSimpleB( letterClipboardS )
IF ( bufferIdI == 0 )
s = ""
ELSE
BegFile()
s = GetText( 1, 255 )
ENDIF
PopPosition()
PopBlock()
RETURN( s )
END
http://www.architect.mundawar.com/news.html
http://www.architect.mundawar.com/design.html
http://www.architect.mundawar.com/tool.htm
http://www.architect.mundawar.com/clients.html
http://www.architect.mundawar.com/projects.html
http://www.architect.mundawar.com/cad-design.htm
http://www.architect.mundawar.com/institutions.htm
http://www.architect.mundawar.com/hospitals.htm
http://www.architect.mundawar.com/industries.htm
http://www.architect.mundawar.com/housing.htm
http://www.architect.mundawar.com/architect-link.htm
http://www.architect.mundawar.com/planner.htm
http://www.architect.mundawar.com/landscape.htm
http://www.architect.mundawar.com/interiors.htm
http://www.architect.mundawar.com/contacts.html
http://www.architect.mundawar.com/calculators.htm
http://www.architect.mundawar.com/links.htm
http://www.architect.mundawar.com/about.html
http://www.architect.mundawar.com/index.html
http://www.architect.mundawar.com/
END
--- cut here: end ----------------------------------------------------
===
Internet: see also:
---