Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display Text in a Box
#1
Hello!

Is it possible to create a box/message/dialog to display some text that can change in a macro?

I mean is it possible to display some text in a box, not with the out command ?

for example:



Macro:

str s

;start

s.format("0x%X" pixel(xm ym))

> display s in a box ???? (not with out s)

0.5
goto start



the mes command is not good because it waits for a click (button "ok", "cancel" ...)

I want to display s in "real time" and in a box....

Do you understand my question, and is that possible?!

Lot of Thanks
#2
Use OnScreenDisplay. Then macro does not wait. With certain flags it is not transparent and the used can click to hide.
#3
thanks for your reply!

now it is possible to display text in a "message box" ?!

example:it would work like this:

Macro

str txt
...
if condition1
;txt="text1"
else if condition2
;txt="text2"
...
and i would like a box with txt text...
mes(txt ....)
but mes is not that command because of waiting button....
#4
In macro:

str s
int i

for i 0 10

s.from("",i)
OnScreenDisplay s
0.5


how can i clear previous OnScreenDisplay?!

i mean 1 comes on 0, 2comes on 1, 3 comes on 2 .. and we dont see nothing! thanks
#5
This function is similar to mes but the caller does not wait until the box is closed. Also, format-string cannot be used directly, so you have to use str format function if you need formatted text.

Function MsgBoxAsync
Code:
Copy      Help
;\
function ~text [$caption] [$style] [flags] ;;flags: 1 sync

if(flags&1)
,mes text caption style
else
,mac "MsgBoxAsync" "" text caption style 1

-----------

To hide previous OSD, use osdid argument. It must be some unique string. Next time you call the function it will show the text in the same OSD window, if it still exists.


Forum Jump:


Users browsing this thread: 1 Guest(s)