Jump to content
Macro Express Forums

Sizing the Command Prompt window?


Recommended Posts

For a small project I'm having to work in the command prompt, an unfamiliar environment for me nowadays. I was surprised to find that there's no agreement between the size and position shown in its Properties, versus that from ME Pro. Nor does the Command Prompt window respond correctly to ME Pro's sizing and positioning commands.

 

Not just ME Pro either. For example, using Sizer to try making it 800x600 results in 804x611 (and not positioned as per Sizer either).

 

Anyone have any insight into this stuff please?

 

CommandPrompt-Sizing-1.jpg

 

 

--
Terry, East Grinstead, UK

Link to comment
Share on other sites

You're confusing two different dimensions. There's the window pixel size which I think you can change to some extend with MEP and then there's the character size. When it says width is 120 it means characters, not pixels. And the height is the number of rows. I don't think that you can increase the width more than the character width. Try typing out 120 characters and I'm guessing you will see it wrap after that and decreasing the width of the window will not change the wrapping.

Link to comment
Share on other sites

But is there a way to convert between the two?

 

Edit:

Further study shows that the conversion rules are as follows:

1. Under Properties > Font note the font size, e.g. 8 x 12 = Fw x Fh
2. Under Properties > Layout note the Windows Size, e.g. 100 x 75 = W x H
3. Tests show that the fixed extra width and height values are 28 and 47

So the pixel size is ((Fw x W) + 28) by ((Fh x H) + 47)

Examples, all with Font size 8 x 12:

Layout > Window size         Calculation           Size in pixels
--------------------   --------------------------  --------------
     120 x 60          120x8+28=988, 60x12+47=767    988 x 767
     
     100 x 75          100x8+28=828, 75X12+47=947    828 x 947




However, I can achieve what I want with keystrokes and no mouse clicks, using the Alt+Space keyboard shortcut, so conversion is now unnecessary. But my curiosity is satisfied!

 

 

-

Terry, East Grinstead, UK

Link to comment
Share on other sites

It depends on the font you select. And if it's not a uniform width font then it needs to be calculated. With advanced programs you can actually do this but I see no practical way here.

Link to comment
Share on other sites

You've lost me.

 

Where do you find non-uniform font widths in your Command Prompt window? In mine, there are only two font types offered, Raster and Lucida Console, and both are uniform widths.

 

Calculated? What's wrong with the calculation method I presented?

 

--
Terry, East Grinstead, UK

Link to comment
Share on other sites

You're right. I thought one could specify any font but I was wrong. One can add more fonts that the standard 2 but the restriction is that they be uniform width. So in that case you could calculate as you suggest.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...