jennico Posted July 29, 2007 Share Posted July 29, 2007 this is simple but i can't find it nowhere: on creating gui what is the default font used by autoit, the size (should be 9 ?) and the weight (default 400 = normal) ? it is not the system's setting, i tried this. second question: can i set the default font for an entire program instead of just for one gui ? j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
martin Posted July 29, 2007 Share Posted July 29, 2007 this is simple but i can't find it nowhere:on creating gui what is the default font used by autoit, the size (should be 9 ?) and the weight (default 400 = normal) ?it is not the system's setting, i tried this. second question: can i set the default font for an entire program instead of just for one gui ?j.See GUISetFont in the help. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
jennico Posted July 29, 2007 Author Share Posted July 29, 2007 (edited) GUISetFont -------------------------------------------------------------------------------- Sets the default font for a GUI window. GUISetFont (size [, weight [, attribute [, fontname [, winhandle]]]] ) Parameters size Fontsize (default is 9). weight [optional] Font weight (default 400 = normal). attribute [optional] To define italic:2 underlined:4 strike:8 char format (add together the values of all the styles required, 2+4 = italic and underlined). fontname [optional] Font to use. (OS default GUI font is used if the font is "" or is not found). winhandle [optional] Windows handle as returned by GUICreate (default is the previously used window). Return Value Success: Returns 1. Failure: Returns 0. Remarks See the Appendix for a complete list of Windows fonts and Windows versions under which they are supported. Size can contain a decimal as in 8.5. Related GUICtrlSetFont Example #include <GUIConstants.au3> GUICreate ("My GUI default font") ; will create a dialog box that when displayed is centered $font="Comic Sans MS" GUISetFont (9, 400, 4, $font) ; will display underlined characters GUICtrlCreateLabel ("underlined label",10,20) GUISetFont (9, 400, 2, $font) ; will display underlined characters GUICtrlCreateLabel ("italic label", 10,40) GUISetFont (9, 400, 8, $font) ; will display underlined characters GUICtrlCreateLabel ("strike label",10,60) GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend well okay, maybe i am stupid and i cannot read. AND MAYBE I AM NOT ABLE TO USE THE HELP FILE. :-( but more likely there is no answer to my question. so i try it once more: this is simple but i can't find it nowhere: on creating gui what is the default font used by autoit, the size (should be 9 ?) and the weight (default 400 = normal) ? it is not the system's setting, i tried this. second question: can i set the default font for an entire program instead of just for one gui ? j. PLEASE: in other words: 1. What is the default font that autoit uses when you do not set a font ?????? i repeat: it is NOT right that the OS default font is used. i tried that. 2. How can i change the default font for the entire program, not for every single gui ???????? (if possible) maybe someone with the will and the capability of reading and answering questions is reading this and gives me a more competent answer than: "read the help file". thank you indeed !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! j. Edited July 29, 2007 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
jennico Posted July 29, 2007 Author Share Posted July 29, 2007 okay, i will try to precise my question: according to the mentioned help file the default font should be size=9, weight=400, fontname=OS default GUI font. but what is the OS default GUI font ? how can i retrieve it ? it is definitely NOT returned by the SystemParametersInfo (which refers to the "display properties/display/advanced" settings). it is definitely NOT the font you can find in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes under "MS Shell Dlg" or "MS Shell Dlg 2". neither of the fonts i find in SystemParametersInfo or HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes match the font used in an autoit gui. this can be revealed by trying guisetfont(9,400,0,......) with the found font. but it is NOT the same. so please: anyone can answer my question ? j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
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