Welcome, Guest. Please login or register.

Author Topic: Programming ?: How do I get the current shell window's dimensions programmatically...  (Read 2086 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline nyteschaydeTopic starter

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 643
    • Show only replies by nyteschayde
    • http://www.nyteshade.com
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
Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
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.
Playstation Network ID: xeron6