Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OnScreenDisplay PROGRESS MONITORING ...
#1
hello , How to display some text using OnScreenDisplay one by one like (PROGRESS MONITORING) :

OnScreenDisplay "Test 1 begin ...."

some code. ...

and OnScreenDisplay " passed or not " but in this same line (as Test 1 begin .... result of test)

NEXT TEST :

OnScreenDisplay "Test 2 begin ...."

some code. ...

and OnScreenDisplay " passed or not " but in this same line (as Test 2 begin .... result of test)

and next , next , next , test.........

And i wish to next test progres does not erase firs test result , just move all test line up , and on macro end write result to file (c:\resut.txt) if posible
#2
Code:
Copy      Help
;;Configurations:
def num_of_tests 3
def result_filepath "c:\result.txt"

;;Declarations:
ARRAY(str) pass.create(num_of_tests)
str bin
int i

for(i 0 pass.len)
,pass[i] = "Not passed"

i = 0

;;Tests:
if(1=1) pass[i] = "Passed"
bin.from(bin "Test " i+1 ": " pass[i] "[]")
i = i + 1

if(1=0) pass[i] = "Passed"
bin.from(bin "Test " i+1 ": " pass[i] "[]")
i = i + 1

if(0=0) pass[i] = "Passed"
bin.from(bin "Test " i+1 ": " pass[i] "[]")
i = i + 1

;;Result OSD:
OnScreenDisplay bin 4 0 0 0 30 255 2

;;Result file:
bin.setfile(result_filepath)

EDIT: Better code and result file added.
EDIT2: Updated again
EDIT3: Code optimized
#3
Thank you for reply , but how to make it in one line like "TEST 1 : ... PASSED" and not desapearing just start form top of screen and one by one , clear when macro end.
#4
instead of always reasigning the variable value append to it like this.


Code:
Copy      Help
str a b

a="first line"
b="second line"
a.from(a "[]" b)
out a
a.from(a "[]" "third line")
out a
An old blog on QM coding and automation.

The Macro Hook
#5
ken gray Wrote:instead of always reasigning the variable value append to it like this.

I don't get your point..
#6
HOW U MAKE clolor for onscreendisplay
#7
OnScreenDisplay
function $text [^_time] [x] [y] [$fname] [fsize] [fcolor] [flags] [$osdid] [bcolor] ;;flags: 1 nontransparent, 2 synchronous, 4 click to hide

Temporarily displays short text 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, work area. If <0, relative to bottom/right. Default or 0: center.
fname, fsize, fcolor - font name (default "Arial"), size (default 24) and color (default 0xff00).
flags - combination of these values:
1 - nontransparent. Transparency is not supported on Win98/Me.
2 - synchronous. Caller waits _time seconds until text disappears.
4 - the user can click to hide. The OSD window is nontransparent.
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 must be set.

EXAMPLE
OnScreenDisplay "Text"
An old blog on QM coding and automation.

The Macro Hook
#8
RYAN27777 Wrote:HOW U MAKE clolor for onscreendisplay
follow all of the flags
Smile 8)


Forum Jump:


Users browsing this thread: 4 Guest(s)