English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System > Coders. Scripting

 
 
Thread Tools
Old 21 January 2021, 19:35   #1
bplcon0
Registered User
 
bplcon0's Avatar
 
Join Date: May 2018
Location: Terrassa / Spain
Age: 50
Posts: 8
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
bplcon0 is offline  
Old 22 January 2021, 07:49   #2
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,215
Quote:
Originally Posted by bplcon0 View Post
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".
Thomas Richter is offline  
Old 16 February 2021, 08:36   #3
bplcon0
Registered User
 
bplcon0's Avatar
 
Join Date: May 2018
Location: Terrassa / Spain
Age: 50
Posts: 8
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
bplcon0 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear background color for Shell window- Shell-StartUp fc.studio support.Apps 13 25 March 2022 18:52
Open workbench directory window from shell Sim085 support.Other 11 21 March 2022 18:14
Detect a single keystroke in the Shell window dissident Coders. System 14 21 January 2020 22:05
Start script without opening a Shell window Joel_w support.Apps 6 01 February 2019 16:56
Snapshot Amiga Shell window? TenLeftFingers support.Apps 3 15 June 2015 16:38

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06443 seconds with 15 queries