![]() Zero or more of the following options may be present in Options, each separated from the next with one or more spaces or tabs (specify each number as decimal, not hexadecimal): If there is no previous size, the window will be auto-sized according to the size and positions of the controls it contains. If there is no previous position, the window will be auto-centered in one or both dimensions if the X and/or Y options mentioned below are absent. Omit the X, Y, W, and H options below to have the window retain its previous size and position. If Title is omitted, the previous title is retained (or if none, the script's file name is used). Unless otherwise specified in Options, this sub-command makes the window visible, unminimizes it (if necessary), activates it, and sets its title. The options are described in the section Options and Styles for a Control.įor example: Gui, Add, Text, Please enter your name: Options is a string of zero or more options and styles, each separated from the next with one or more spaces or tabs. Gui, Add, ControlType, Options, TextĬontrolType is one of the following: ActiveX, Button, CheckBox, ComboBox, Custom, DateTime, DropDownList (or DDL), Edit, GroupBox, Hotkey, Link, ListBox, ListView, MonthCal, Picture (or Pic), Progress, Radio, Slider, StatusBar, Tab, Tab2, Tab3, Text, TreeView, UpDown AddĪdds a control to a GUI window (first creating the GUI window itself, if necessary). Note: Prior to, this sub-command did not set the default GUI if a name was specified. Whenever the GUI launches a new thread, A_Gui contains a HWND instead of a name.Special labels such as GuiClose have the default "Gui" prefix unless overridden by +Label Prefix in the options.If no name is given, the following applies: Sometimes it is more intuitive to set the window's title when the GUI is created instead of when it is shown.This can be especially useful if the script needs to create more than one GUI, or is intended to be included in other scripts. Gui New eliminates the need to pick a unique name or number for each GUI.It might also make the script's purpose clearer to other people who read your code (or future you). Calling Gui New ensures that the script is creating a new GUI, not modifying an existing one.Gui, % GuiHwnd%:Default can be used to make the other Gui commands operate on it by default. Use the +Hwnd GuiHwnd option to store the HWND of the new window in GuiHwnd. ![]() If the GUI has no name and is not the default GUI, it must be identified by its HWND.Although the new window is set as the default for the current thread, non-GUI threads still default to GUI number 1.In most cases the window is created automatically on demand, so it is usually unnecessary to call Gui New.This sub-command comes with the following caveats: If Title is omitted, the script's file name is used. Options can contain any of the options supported by the main GUI command. Otherwise, a new unnamed and unnumbered GUI will be created. If GuiName is specified, a new GUI will be created, destroying any existing GUI with that name. Gui, New, Options, Title Gui, GuiName:New, Options, Title ![]() : Changes the appearance and behavior of the window.Ĭreates a new window and sets it as the default for the current thread.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |