<< Click to Display Table of Contents >> Navigation: 3. Script Language > Input- and Output commands > Input and Output Commands |
MiniRobotLanguage (MRL)
CLP. Command
Clipboard Operation
Intention
Return or set the Value of the System Clipboard(s).
Modes of operation:
1. CLP.proto|$$MAIN[|$$CPT]
2. CLP. (no parameter) put Clipboard -> TOS
3. CLP.c - Clipboard Clear
4. CLP.$$TXT - write Text to Clipboard
5. CLP.r|$$RET|$$CPT
' read Text/Variable from Clipboard
6. CLP.t|$$TXT|$$CPT
' write Variable-Content to Clipboard
7. CLP.w|$$TXT|$$CPT
' wait for Clipboard-Change
Syntax
CLP.P1|P2[|P3]
Parameter Explanation
P1 - Type of Operation
Please specify only one prototype-letter for this command.
Successive letters will be ignored.
t - write Text to clipboard
r - read from Clipboard
c - Clear the Clipboard.
w - wait for Clipboard change.
P1 is maximum waiting-time in seconds or zero for endless.
P2 gets the new value from the clipboard.
The result can be in the original Variable P1 or if P3 is given, it will be placed in P3.
P2 - VAR with string or for result
P3 - optional: Clipboard Type to use.
Speed in Ticks:
This command uses typically around 1000 to 7000 Ticks heavily depending on Parameters.
Example
'***********************************
' CLP.-Sample 1
'***********************************
' Screenshot the desktop into Clipboard.
'***********************************
' CLP.-Sample 2
'***********************************
' Remove a picture from Clipboard
CLP.c||2
ENR.
'***********************************
' CLP.-DEMO
'***********************************
: §§TXT=http://www.it-berater.org
' When using no parameter, CLP. returns the Text-Clipboard-Content on Stack
CLP.
PRT.Stack-Content:>$$000<
PRT.---------------------------
' When using one parameter, CLP. writes the String into the Text-Clipboard
CLP.§§TXT
CLP.r|§§OUT
PRT.Clipboard: >§§OUT<
PRT.---------------------------
' Now we clear the Clipboard and use the systemvariable for Clipboard
CLP.§§TXT
CLP.c
CLP.r|§§OUT
PRT.Clipboard: >$cpb$<>§§OUT<
PRT.---------------------------
' Starting Parallel-Robot that will change the clipboard
PRR.
PAU.5
CLP.t|Hallo!
PAU.5
CLP.t|Hey man!
ENR.
PRE.
PRT. Waiting for Change!
CLP.§§TXT
CLP.w
PRT. Clipboard is: >$cpb$<
PRT.---------------------------
PRT. Now waiting for change with timeout 50 Seconds
: §§TRIM=5
CLP.w|§§TIM|§§CIP
' The Changeflag is 0 if a timeout has occured and 1 if the clipboard has changed in time
PRT.Clipboard Change to >§§CIP< Changeflag was: §§TIM
DMP.4
MBX.Ready
END.
Speed in Ticks:
This command uses typically around 7000 Ticks heavily depending on Parameters.
Remarks
The following Clipboard-Types can be used as third parameter (use the number!. If you are not sure for what you need this parameter, don't use it. Default value if omitted is 7.
TEXT = 1
BITMAP = 2
METAFILEPICT = 3
SYLK = 4
DIF = 5
TIFF = 6
OEMTEXT = 7
DIB = 8
PALETTE = 9
PENDATA = 10
RIFF = 11
WAVE = 12
UNICODETEXT = 13
ENHMETAFILE = 14
HDROP = 15
LOCALE = 16
DIBV5 = 17
MAX = 18 ' varies by Windows version
Limitations:
Use the ANA.ToClipboard-Command to place Pictures in the Clipboard.
To Read Pictures from the Clipboard, use the ANA.FromClipboard-Command.
See also: