abraXas Posted June 27, 2009 Posted June 27, 2009 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
colafrysen Posted June 27, 2009 Posted June 27, 2009 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 advanceabraxasI 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]
colafrysen Posted June 27, 2009 Posted June 27, 2009 (edited) 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 June 27, 2009 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]
Mat Posted June 27, 2009 Posted June 27, 2009 (edited) 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 tweakHKEY_CURRENT_USER\Console\%SystemRoot%_System32_cmd.exe FontSize FontFamily FontWeight FaceName MDieseledit: see below for a working version. Edited June 27, 2009 by mdiesel AutoIt Project Listing
abraXas Posted June 27, 2009 Author Posted June 27, 2009 Wow, thanks both of you. That's what exactly what I needed.
Mat Posted June 27, 2009 Posted June 27, 2009 (edited) 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... but it would appear that this is where the settings are stored. and this ones working 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 June 27, 2009 by mdiesel AutoIt Project Listing
colafrysen Posted June 27, 2009 Posted June 27, 2009 (edited) Doesn't For $i = 1 to 9 Send ("{TAB}") Next Equal Send ("{TAB 9}") ? Edited June 27, 2009 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]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now