Question
· Sep 11, 2019

How to use System and Terminal functions

Hello everyone,

I am trying to use @() and SYSTEM() from Cache Terminal. I am searching for blinking text . I have found -5 as a Screen Display Option but not aware like how to use on terminal.
Can any one please help ?

Thanks,
Gunwant

Discussion (8)1
Log in or sign up to continue

It sounds like you're using the Multivalue features of Cache. From the MV Shell prompt you can use the semicolon command to execute an MVBasic statement:

USER:; crt @(-5):"This is blinking":@(-6):" and this isn't"

From ObjectScript, you can use the MV command:

USER>mv "; crt @(-5):""This is blinking"":@(-6):"" and this isn't"""

or in ObjectScript you can use the $MVAT() function:

USER>w $MVAT(-5)_"This is blinking"_$MVAT(-6)_" and this isn't"

If you are coming from a Multivalue background, then documentation for the multivalue features of Cache comes with Cache, or can be found online at https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?K...

If you aren't already using Multivalue, then you can use the examples of ansi terminal control sequences posted above, like

set CSI=$C(27)_"["
; optionally, you could use set CSI=$c(155)
set BLINKON=CSI_"5m", BLINKOFF=CSI_"0m"
write BLINKON_"Hello"_BLINKOFF

Do a web search for "ansi control sequences" for more information. This is of course assuming that you are using a terminal that supports ansi. Cache Terminal does.

If you are going to be doing a lot of terminal control, you probably want to look into mnemonic spaces: https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?K.... For example, to blink:

use $io::"^%XDTM"
w /AI,"Hello ",/AA,"World"

Cache comes with 2 routines to use as mnemonic spaces, or you can create your own.