Title: Z! Controller - Monitor
======

Refresh rate: 1000 ms
=============

Gauge width: 80 pixels (fixed)
============

Rexx code: (Gauge script)
=========================

/* Z! Controller - monitor */

/* -- User configuration Section -------------- */
PipeName = '\pipe\zmp3'
ScrollFactor = 10
/* -- End User Configuration ---------------- */

gauge.1 = 100

rc = lineout(PipeName, '*id3track')
ztext = linein(PipeName)
rc = stream(PipeName, 'C', 'CLOSE')

if ztext \= '' then do
	scrolltext = ztext
	/* gauge.tooltip = ztext */
	signal scroller
end; else do
	gauge.text = 'Z! - silence'
	gauge.user = 1
end

exit

scroller:
	ScrollInit = gauge.user
	if (ScrollInit = '') | ,
	   (ScrollInit > (length(scrolltext) - ScrollFactor)),
	then
		ScrollInit = 1
	else
		ScrollInit = ScrollInit + 1

	gauge.text = substr(scrolltext, ScrollInit, ScrollFactor)
	gauge.user = ScrollInit



Rexx code: (Double click action)
================================

/* Double-click action for Z! Controller Monitor */
rc = RxFuncAdd('SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs')
if rc = 0 then call SysLoadFuncs

/* -- User configuration Section -------------- */
ZPath = 'E:\MYAPPS\Z\Z.EXE'
/* -- End User Configuration ---------------- */

rc = SysOpenObject(ZPath, DEFAULT, TRUE)

