<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > Undercover and Graphics > Undercover Operations |
MiniRobotLanguage (MRL)
UCV. command
Undercover graphics
Intention
Undercover Graphics can be used for these purposes:
1. They can protect your script from being interrupted by a User
2. They can hide your running installations/operations behind a desktop-cover
3. They can show a custom bitmap or graphic to communicate a message to the user
4. The cover "glas" can emulate a "Mouse disable" to some degree, as a user can
only click onto the cover and can not disturb the setup process easily.
These and more features are supported:
1. "cover" - generate a TopMost Form in front of the primary desktop
2. "no blend", "no blend-in","no blend-out" - optional soft fade-in and fade-out transitions
3. "glas" - completely invisible galas-form can prevent the user from clicking, while the user
can see everything that happens below.
4. "matte" - Half Transparent cover can prevent the user from clicking, while still allowing
to watch
through it whats going on below.
5. "desktop-copy" - Create a desktop-Screen-Shot that is identical to the current desktop to
completely hide all Operations below (undercover).
6. "desktop bw" - Create a desktop screens-hot and change it to grey (no colors).
7. "cover" - generate a non-transparent cover and color it with a solid background color of
your choice
8. "gradient" - generate a non-transparent cover and color it with a smooth color
transition of your choice
9. "write" - Print Text in any size, position and font on to the foreground graphic
10. "print" - print listings and scrolling text-messages
11. "load image" - load any ".bmp" file and resize it to fit the cover-screen.
12. "close". Same like "UCV." without any Subcommand. WIll remove any cover
immediately.
13. "fillstyle" - used to define the style (color and pattern) of the fill-operation used for the UCV.box and the UCV.ellipse command.
14. "drawto" - used to paint a line between two points.
As you can see, UCV. serves two targets:
1. You can hide your automatic script from user interaction
2. You can use the graphics commands to paint pictures and show them to your audience.
To achieve these goals, Smart Package Robot will
- create a "Cover"-Form that will be placed above all other non-TopMost Forms.
- eventually copy a desktop screenshot or anotehr graphic onto that form
- that form will prevent the user from being able to see or click anything that is
below that form.*
- you can still use the Direct Engine to work with Setup-Programs.
- the Compatible Engine will not work if a Cover shields the desktop.
For the user this will happen completely transparent, he may not be aware what happens below the cover.
The "desktop-picture cover" is shown with the simple line:
UCV.dc
PAU.10
' This line will remove the cover
UCV.
Any cover is been removed immediately, when the script-process ends or when the script runs into an error.
The desktop-cover behavior can be changed/customized using the additional features:
UCV.transparency
UCV.no transparency
UCV.no blend
UCV.no blend-in
UCV.no blend-out
UCV.write
' this line will remove the cover
UCV.close
You can make the desktop-cover half transparent, by prefixing the script with:
UCV.tra
UCV.dc
PAU.10
' This line will remove the cover
UCV.
You may set up a Cover-Script from multiple UCV.-commands (see Parameter Explanation below). Use them in a sequence that will:
- first specify a Modifier,
- then Generate the Cover of your choice
- then customize the Cover
Example:
' We use a Modifier to prevent fading
UCV.nb
' Now we start a Cover, a Gradient Cover
UCV.grd|&HFF00FF|&H00FF00
' We wait for 5 Seconds
PAU.5
' We customize the cover printing something on it
' at coordinates 10,300
UCV.write|Please wait!|10,300
PAU.5
' We close the cover
UCV.
* PopUp-Menus and other TopMost Forms may be able to get temporarily in front of the Cover-form. This is due to windows-technical reasons and not a bug.
Syntax
UCV.[P1][|P2...|Px]
Parameter Explanation
P1 - (optional) Subcommand description
.
P2 .. Px - (optional) Parameters depending on the used Subcommand.
The following Subcommands are supported:
Cover Modifiiers:
"no blend","nb"
"no blend-out","nbo"
"no blend-in","nbi"
"transparency","tra"
"no transparency","ntr"
Generate cover:
"desktop-copy","dc"
"desktop bw","dbw"
"glas"
"matte","mat"
"cover","cov"
"gradient","grd"
Customize Cover:
"background","bgr"
"foreground","fgr"
"print","prt"
"plot","spo"
"reset font","rsf"
"set font","sft"
"load image","ldi"
"write","wri"
"close","clo"
"box"
"drawto","line"
"ellipse","eli"
"fillstyle","fst"
You may set up a Cover-Script from multiple UCV.-commands.
Use the sequence that you
- first specify a Modifier,
- then Generate the Cover of your choice
- then customize the Cover
to remove a Cover, just use:
UCV.close
or
UCV.
Example
'***********************************
' UCV.-Sample
' In this Mode, the cover will fade in slowly
' which is invisible if no on going
' changes on the desktop happen.
'***********************************
' Switch cover on
UCV.desktop-copy
PAU.20
UCV.
ENR.
'***********************************
' UCV.-Sample 2
' In this Mode, the cover will appear immediately.
'
'***********************************
' prevent fade-in
UCV.no blend-in
' Switch cover on
UCV.desktop-copy
PAU.20
UCV.
ENR.
'***********************************
' UCV.-Sample 3
' In this Mode, the cover will appear
' and then be faded to transparent.
'
'***********************************
'
UCV.dc
UCV.tra
PAU.10
' This line will remove the cover
UCV.
'***********************************
' UCV.-Sample 4
' In this Mode, the cover will appear
' without fading.
' Then we will change the background color
' and start printing a larger text.
'
'***********************************
'
$$TXT=Hallo my dear, try the PRINT command also ....
STR.CLONE|$$TXT|6000|$$TXT
UCV.nb
UCV.tra
UCV.cov
UCV.bgr|&HFF00FF
UCV.set font|futura t|40|||0
UCV.pri|$$TXT
PAU.4
UCV.
ENR.
'***********************************
' UCV.-Sample 5
' Paint mathematical figure
'***********************************
'#SPI:Forcewrite
UCV.nb
UCV.grd|&HFF4545
' Set red foreground color
UCV.fgr|&HFFFF00
FOR.$$F00|0|45|0.002
$$C00=0.7
CAX.$$X00=COS(16*$$F00)+$$C00*COS(-4*$$F00)
CAX.$$Y00=SIN(16*$$F00)+$$C00*SIN(-4*$$F00)
CAL.$$Y00=$$Y00*260+700
CAL.$$X00=260*$$X00+700
IVV.$$Y00>0
UCV.plot|$$X00,$$Y00
UCV.drawto|($$X00+2),($$Y00+2)
UCV.plot|$$X00,$$Y00
UCV.drawto|($$X00),($$Y00+2)
UCV.plot|$$X00,$$Y00
UCV.drawto|($$X00+2),($$Y00
EIF.
NEX.
PAU.1
ENR.
Remarks
You can use the command CCV. to make calculations with the RGB-Colors.
Limitations:
The Cover will not have any transparency or glas-effects on Windows 2000 or below, as these are not supported below Windows XP.
The Cover needs sufficient graphical resources. On heavily loaded systems with not enough graphical system resources, the cover may just not appear.If you open and close the cover too often, also the cover may just not appear anymore. Both of these issues can quickly be fixed by rebooting the computer.
Important note:
On Error: If your script runs into an Error, then the cover is removed immediately, even before the script has ended. This is to make sure that you can look for the source of the error.
The cover is removed in any error-case, even if the USM. (Use silent mode) command is used,
PopUp-Menus and other TopMost Forms may be able to get temporarily in front of the Cover-form. This is due to windows-technical reasons and not a bug.
See also:
• ! Smart Package Robot 's Undercover Operations