Jump to content

Change fontsize for a console application


Recommended Posts

Hi, i want to change the font size of my console app everytime i start it. this works by hand with rightclick, properties, font, size. however i want to have this done automatically. the only idea i have at this moment is with mousemove/mouseclick, which kinda sucks for a solution. is there any other way?

thanks in advance

abraxas

Link to comment
Share on other sites

Hi, i want to change the font size of my console app everytime i start it. this works by hand with rightclick, properties, font, size. however i want to have this done automatically. the only idea i have at this moment is with mousemove/mouseclick, which kinda sucks for a solution. is there any other way?

thanks in advance

abraxas

I am not sure this will help you, but i'll post it anyway.

When you make a shortcut to the CMD, the shortcut automatically detects that its the Command Line thus allowing you to change fonts for that specific instance of CMD.

If you start your program as a parameter in the CMD-shortcut then you will be able to set the font for the shortcut only, and leaving the normal CMD as it is.

[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
Share on other sites

Oh and forgot to add that you will have to use the /K or /C flag for executing a program after CMD

For example, Write this in the "Target" field when editing your shortcut:

%windir%\system32\CMD.exe /K yourprogram.exe - Carries out command and remains
%windir%\system32\CMD.exe /C yourprogram.exe - Carries out command and exits

For all parameters, write CMD /? in CMD

Edited by colafrysen
[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
Share on other sites

CMD works very differently from standard windows, that why its hard to use functions such as the control functions and I beleive send aswell.

Anyhow, it is possible. Registry tweak

HKEY_CURRENT_USER\Console\%SystemRoot%_System32_cmd.exe
FontSize
FontFamily
FontWeight
FaceName

:D

MDiesel

edit: see below for a working version.

Edited by mdiesel
Link to comment
Share on other sites

Anther method that includes no mouseclicks, but does use send. This is very fast though, and accurate too.

$Pid = Run ("cmd.exe")
ProcessWait ($Pid)
Send ("!{SPACE}")
Send ("p")
For $i = 1 to 9
   Send ("{TAB}")
Next
Send ("{RIGHT}")

That registry tweak doesn't appear to be working for me anymore... :D but it would appear that this is where the settings are stored. and this ones working :D

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont

MDiesel

Edit: that properties window is wierd. the console I can accept not being a normal window, but that properties one doesn't even have a class!

Edited by mdiesel
Link to comment
Share on other sites

Doesn't

For $i = 1 to 9

Send ("{TAB}")

Next

Equal

Send ("{TAB 9}")

?

Edited by colafrysen
[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...