<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > Non-IR Operations > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
SPC. Command
Set Pixel Colour
Intention
SPC will set the color of a Screen-Pixel non-permanent. You can specify coordinates in Screen-, or as window-coordinates.
For drawing on any background, you can just omit the color value then the actual color of that point will be inverted.
Please prefer using the Drawing Commands from the ANA.-Command.
This Command is mostly for use with WLC. or IPC. etc.
Syntax
SPC.[P1][|P2,P3][|P4]
Parameter Explanation
P1 - (optional) prototype coordinates
Prototype can be omitted or any of:
r - do relative Movement from actual point
c - use child-coordinates
o - use coordinates from actual window whatever
t - use actual top-window coordinates
l - when using "l", x and y values are ignored, and internally
calculated as the left side of the rectangle, where a
checkmark could be. "l" - is for checkmarks.
s - (default) use screen coordinates
If prototype is omitted, Screen-Coordinates are taken.
P2, P3 - (optional) x,y - coordinates
numeric coordinates, separated by comma. You can use
variable and Formula in (..). You can also use a
Point-Variable instead of two coordinates.
P4 - the color to set the pixel to, if omitted actual pixel-color
is inverted.
Instead of using separate variables for X and Y, you also use a Point-Variable, where x and y values are separated by a ",".
VAR.§§PAP=10,10
SPC.§§PRE|§§PAP|§§COL
Example
'***********************************
' SPC.-Demo
' Run as EXE (Compiled)
' or it may be really slow!
'***********************************
JSR.closeNotepads
EXO.notepad
STW.tc|editor|notepad
SCW.c|edit
' Paint on Screen
: §§RNA=o
: §§PRE=s
JSR.paint
MBX. Point on TopWindow $crlf$ (you may not see something)
' Paint on TOP-Window-Area
: §§RNA=1
: §§PRE=t
JSR.paint
PAU.2
MBX.Paint into Control
' Paint on Child-Window-Area
: §§RNA=o
: §§PRE=c
JSR.paint
MBX.!
DMP.
PRT. Pixel-Color is: $$000
PRT. Red is: $$000
PRT. Green is: $$000
PRT. Blue is: $$000
STS.DUMP
MBX.!
END.
:paint
FOR.§§LOY|1|50
FOR.§§LOX|1|50
IVV.§§RNA=0
RND.0|22000000|§§RND
ELS.
: §§RND=2142345
EIF.
SPC.§§PRE|§§LOX,§§LOY|§§RND
' change this line to the following and see the difference
' SPC.§§PRE|§§LOX,§§LOY
NEX.
NEX.
RET.
:closeNotepads
STW.ctwo|notepad|Editor|0|overcn
CLW.
JMP.closeNotepads
:overcn
RET.
Remarks
-
Limitations:
All your drawings will disappear, when the window is going to be refreshed.
See also:
• 1.8. Selecting the Application (Topwindow)
• IPC. / NPC. - If-Pixel-Colour