Print Page | Close Window

Request terminal state

Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: Scripting & Automation
Forum Description: Customize and control AccuTerm using scripts and automation
URL: https://forum.asent.com/forum_posts.asp?TID=2642
Printed Date: March 28 2024 at 7:19am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Request terminal state
Posted By: Jamie
Subject: Request terminal state
Date Posted: August 03 2017 at 1:41pm
I would like to request terminal state and then subsequently restore terminal state with AccuTerm from within UniVerse Basic.

Just to add a point of reference and context, I was able to force the user's terminal tp extended screen size. In the AccuTerm user manual, the command to do that was listed as follows:

ESC STX E


I was able to successfully implement the forced changed from within UniVerse Basic as follows:

equ escChar to char(27)
equ stxChar to char(2)
crt escChar:stxChar:"E"


The command to request terminal state is listed in the AccuTerm manual as:

CSI 1 $ u


And the command to restore terminal state is listed in the manual as:

DCS 1 $ p string ST


I'm new to this, and don't have prior exposure to this sort of notation. I was able to determine that CSI is a char(155), DCS is a char(144), and ST is a char(156). But past that, I have not had any luck implementing this.

If anyone can offer any guidance, I would be very grateful.

Thank you.

Jamie LaFountain
Application Programmer
D&W Diesel



Replies:
Posted By: PSchellenbach
Date Posted: August 07 2017 at 12:18pm
Hi Jamie -

The CSI and DCS commands are only valid if you are running AccuTerm in VTxxx emulation. They do not work under other emulations. What terminal type are you using for your applications?

Thanks,

Pete



Posted By: Jamie
Date Posted: August 07 2017 at 12:22pm
Pete,

Presently, I am running in ADDS Viewpoint AS Enhanced emulation. Prior to my original post, I did try to get the functionality working while I was in VT100 emulation, but had no luck.

Assuming VT100 emulation, could you please offer some guidance on this particular functionality?

Thank you very  much.

Jamie


Posted By: PSchellenbach
Date Posted: August 07 2017 at 4:40pm
Hi Jamie -

Here's a small program to retrieve the current screen mode (extended or normal) using an AccuTerm script:
EQU ESC TO CHAR(27), STX TO CHAR(2), CR TO CHAR(13)
SCRIPT = 'InitSession.Output CStr(InitSession.ScrMode) & vbCr'
ECHO OFF
PROMPT ''
CRT ESC:STX:'P':SCRIPT:CR:
INPUT MODE
PROMPT '?'
ECHO ON
IF MODE THEN MODE = 'EXT' ELSE MODE = 'NORM'
CRT 'Current screen mode: ':MODE

Hope this helps.

Thanks,

Pete



Posted By: Jamie
Date Posted: August 08 2017 at 6:21am
Pete,

Thanks very much for that demonstration. I really appreciate your time and expertise.

Jamie



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net