Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: nyteschayde on March 20, 2003, 03:32:02 PM

Title: Programming ?: How do I get the current shell window's dimensions programmatically...
Post by: nyteschayde on March 20, 2003, 03:32:02 PM
I am trying to re-write an old command line copying program that I did years ago but I want to add a few features. I need to be able to, in a system friendly way, identify the window the shell command is running in and obtain it's dimensions. Ideally I want to know how wide the screen is in the current font so I can calculate how many characters I have to use.

I will also be supplying a mode where it pops up a graphical progress bar but I will need to get the screen dimensions. I think that is easier but may cause problems since I have never written anything using the RTG system that I now use. I have a PicassoIV and I use P96.

Any help would be appreciated. My email address is nyteschayde@yahoo.com in case any of you wish to drop me a more comprehensive email.

Thanks in advance
Title: Re: Programming ?: How do I get the current shell window's dimensions programmat
Post by: xeron on March 20, 2003, 03:56:18 PM
AFAIK the only way to find the window of your processes shell is to find the console task for your process and send it an ACTION_DISK_INFO (yes, disk info :) DOS packet. If successful, it returns a window pointer in Res1.

I would tell you how to do this in detail, but i'm at work and my Amiga is not.