English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Scripting (https://eab.abime.net/forumdisplay.php?f=117)
-   -   Shell window number of rows & columns (ARexx) (https://eab.abime.net/showthread.php?t=105501)

bplcon0 21 January 2021 19:35

Shell window number of rows & columns (ARexx)
 
Hi all,

I'm learning ARexx and need some help with a script.

I would like to get the current number of rows and columns of the Shell window where it is running on. I'm trying issuing a Window Status Report to the console. Something like:

WSR = '9B'X || '36'X || '6E'X
SAY WSR

But I don't know how to parse the results from the input stream.

Any clue? Is there another way to get that info?

Thx in advance

Thomas Richter 22 January 2021 07:49

Quote:

Originally Posted by bplcon0 (Post 1455657)
I'm learning ARexx and need some help with a script.

I would like to get the current number of rows and columns of the Shell window where it is running on. I'm trying issuing a Window Status Report to the console. Something like:

WSR = '9B'X || '36'X || '6E'X
SAY WSR

That alone doesn't work, at least not with the regular CON: handler of the operating system. You also need to switch CON: to the raw mode, which I would not know how to do from ARexx. The CON: handler does not answer reports in cooked mode, or rather, it swallows what the console-device sends instead of forwarding them.



This *would* work with ViNCEd which also sends the report in the cooked mode. I would there open a channel to the file "*", and read and write from this file instead of working with "say".

bplcon0 16 February 2021 08:36

Thank you for your answer Thomas.

I've coded a simple C program which does what you said. It can be called from ARexx as any regular CLI command to get the info.

Here's the link in case anyone else wants to use it on his/her own ARexx scripts.

https://aminet.net/package/util/cli/gcr10


All times are GMT +2. The time now is 19:13.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.07129 seconds with 11 queries