Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Scripting & Automation
  New Posts New Posts RSS Feed - Request terminal state
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedRequest terminal state

 Post Reply Post Reply
Author
Message
Jamie View Drop Down
Newbie
Newbie


Joined: August 03 2017
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jamie Quote  Post ReplyReply Direct Link To This Post Topic: Request terminal state
    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
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Jamie View Drop Down
Newbie
Newbie


Joined: August 03 2017
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jamie Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Jamie View Drop Down
Newbie
Newbie


Joined: August 03 2017
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jamie Quote  Post ReplyReply Direct Link To This Post Posted: August 08 2017 at 6:21am
Pete,

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

Jamie
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.