Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetProp/SetProp
#10
from quickmacros help

OnScreenDisplay
function $text [^_time] [x] [y] [$fname] [fsize] [fcolor] [flags] [$osdid] [bcolor] [wrapwidth] [$pictfile] ;;flags: 1 nontransparent, 2 synchronous, 4 click to hide, 8 hide when macro ends, 16 use raw x y, 32 place by the mouse, 64 tile pict, 128 pict size, 0x100 bold, 0x200 italic

Temporarily displays short text or/and picture on the screen.

text - text to display. Can be several lines.
_time - number of seconds to display the text. Default or 0: depends on text length. -1 is infinite.
x, y - text coordinates in screen. If flag 16 or 32 not used:
If < 0, relative to bottom/right of the work area.
If 0 (default), screen center.
If > 0, relative to the work area of the monitor where the text is displayed.
The text is displayed on the monitor specified by the _monitor variable.
fname, fsize, fcolor - font name, size (default 24) and color (default 0xff00).
flags - combination of these values:
1 - nontransparent.
2 - synchronous. Caller waits _time seconds until text disappears.
4 - the user can click to hide. The OSD is nontransparent.
8 (QM 2.2.1) - hide the text when the caller macro (thread) ends.
16 (QM 2.2.1) - use raw x and y, relative to the primary monitor. Negative and 0 x y don't have special meaning. _monitor variable is ignored. The function still ensures that all text is in the screen.
32 (QM 2.2.1) - place the text by the mouse pointer. x and y are offsets from the mouse pointer position. The functions ensures that the text is in the same monitor as the mouse pointer. _monitor variable is ignored.
64 (QM 2.3.0) - tile background picture.
128 (QM 2.3.0) - use size of picture, not of text.
0x100 (QM 2.3.2) - font bold.
0x200 (QM 2.3.2) - font italic.
osdid - some string that identifies the OSD window. If this OSD window still exists, displays text in it instead of creating new window. This improves performance when calling this function frequently. Also, later you can use win(osdid "QM_OSD_Class") to get OSD window handle.
bcolor - background color. Flag 1 also should be set, or the color will be transparent (which can be useful with picture).
wrapwidth (QM 2.2.0) - if >0, wraps long text lines at this width. Default or 0: screen width.
pictfile (QM 2.3.0) - background picture file (bmp, jpg, gif). You also should use flag 1 or a background color (bcolor) that is not part of the picture. Otherwise parts of the picture may be transparent.

EXAMPLES
OnScreenDisplay "Text"

OnScreenDisplay "Macro x is running." -1 0 -1 "Comic Sans MS" 0 0xff0000 8
mes 1

Dir d
foreach(d "$my pictures$\*" FE_Dir)
str sPath=d.FileName(1)
sel(sPath 3) case ["*.jpg","*.gif","*.bmp"] case else continue
OnScreenDisplay d.FileName 1.5 0 0 "Comic sans ms" 16 0xc0c0 128|1 "id" 0 0 sPath
1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)