|Last update: 2012-10-23||Screenshots and Support: DonationCoder thread|
Display a dynamic and context-sensitive set of (large) buttons on screen, to start applications, or send keystrokes (using WinSendKeys) to other applications. Can be quite convieniently used with a touchscreen, either a large desktop screen, or a small beside the keyboard model as a dynamic function-key pad.
New: WinButtons adds parameter entry on the Window showing the buttons, opens dropped .wbuc file
New: WinButtonEdit (WBE) Adds all entry fields for configuring these parameters.
2012-10-23: Release: WinButtons (188.8.131.52): Open dropped .wbuc file if no On Drop command defined.
2012-10-23: Release: WinButtonEdit (184.108.40.206): Bugfixes.
2012-10-20: Release: WinButtons (220.127.116.11): Bugfixes.
2012-10-20: Release: WinButtonEdit (18.104.22.168): Bugfixes.
2012-10-09: Release: WinButtons (22.214.171.124): Show parameter entry fields to easily modify standard tools configured on a button.
2012-10-09: Release: WinButtonEdit (126.96.36.199): Configuration fields for parameters, Confirmation prompt.
2011-10-11: Release: WinButtonEdit (188.8.131.52): Before the updater starts asks for confirmation and file-save
2011-10-08: Release: WinButtons (184.108.40.206): Version bump to sport WBE update
2011-10-08: Release: WinButtonEdit (220.127.116.11): Adds an Image parameters configuration window
2011-09-26: Release: WinButtons (18.104.22.168): Borderless buttons with caption split (using @[email protected])
2011-09-26: Release: WinButtonEdit (22.214.171.124): Support for Borderless buttons with caption split
2011-09-24: Release: WinButtons (126.96.36.199): New Borderless buttons, button layout features and support for png images
2011-09-24: Release: WinButtonEdit (188.8.131.52): Support for Borderless buttons and some bugs fixed
2011-09-13: Release: WinButtons (184.108.40.206): Minor bugfixes, added some more samples (numkeypad)
2011-09-13: Release: WinButtonEdit (220.127.116.11): Several anomalies and bugs fixed
2011-09-11: Release: WinButtons (18.104.22.168): Added FlipKeyColor mode, updated and improved after receiving and testing with a real touch-screen
2011-09-11: Release: WinButtonEdit (22.214.171.124): Check for Updates feature (WB and WBE) and several bugfixes and improvements
2011-09-07: Release: WinButtons (126.96.36.199): Bugfix for CursorRestore feature
2011-09-06: Release: WinButtons (188.8.131.52): updated/improved support for CursorRestore
2011-09-06: Release: WinButtonEdit (184.108.40.206): improved configuration for CursorRestore
2011-09-02: Release: WinButtons (220.127.116.11): support for CursorRestore
2011-09-02: Release: WinButtonEdit (18.104.22.168): support for CursorRestore and current preview coordinates
2011-07-27: Release: WinButtonEdit 22.214.171.124: Version-bump, no new issues are reported for several weeks.
2011-07-05: Release: WinButtons (126.96.36.199): Version-bump as last version didn't get the updated version in
2011-07-04: Release: WinButtons (188.8.131.52): support for resizing .bmp images to button-size
2011-07-04: RC10 for WinButtonEdit (0.9.3.0): support for resizing .bmp images to button-size
2011-07-02: Release: WInButtons (184.108.40.206): display icon from .exe, .dll, .ocx and .icl files on buttons
2011-07-02: RC9 for WinButtonEdit (0.9.2.3): select icon in .exe, .dll, .ocx and .icl for image
2011-06-20: RC8 for WinButtonEdit (0.9.1.1): minor changes to Associations
2011-06-19: RC7 for WinButtonEdit (0.9.1.0): bugfixes
2011-06-18: RC6 for WinButtonEdit (0.9.0.0): drag&drop support and file associations, move button to group
2011-06-18: Release: WinButtons (220.127.116.11): preferred file-extension changed from .ini to .wbuc
2011-06-16: Bugfix release for WinButtons (18.104.22.168)
2011-06-14: Release Candidate 5 for WinButtonEdit (0.8.4.1), bugfixes
2011-06-13: WinButtons with Drop Files support (22.214.171.124)
2011-06-13: Release Candidate 4 for WinButtonEdit (0.8.3.1), small bugfix and Drop Files support
2011-06-11: Release Candidate 3 for WinButtonEdit (0.8.2.0), bugfix release after testing by ewemoa and cranioscopical
2011-06-09: Release Candidate 2 for WinButtonEdit (0.8.1.0)
2011-06-05: Release Candidate 1 for WinButtonEdit (0.8.0.0), Update WinButtons (126.96.36.199)
Built in response to a Coding Snack request from the DonationCoder.com forum
There it is to be used on a touch-screen, so large buttons would be useful.
Can switch the set of available buttons when an application gets focus, see the [Groups] section documentation.
Display a set of large buttons, with descriptive captions, that can open a sub-menu, start an application, send keystrokes to another application (using WinSendKeys), or whatever can be done using a windows command-line.
The window can have enabled/disabled a border, close button, taskbar button, different colors and sizes per button, display a bitmap or icon instead of a text-caption, hide itself (and optionally a preceding chain of WinButtons instances) during execution of a command, wait for completion of the command, or exit after starting a command.
Now adding the feature of focussed-application sensitive button-context switching, and arrangeble button-configurations, with different size buttons, based on arrangement-types. Buttons can be extended to double size (1 direction only), 1/2, 1/3rd, 1/4th, 1/6th or 1/9th default size, and combined into 1 'button-area', see the screenshots for a chaos example smiley
A full description of all features is included in the zip-file in WinButtons.readme.txt, documentation for WinButtonEdit is available in WinButtonEdit.readme.txt.
If WinButtonEdit.exe is in the same directory as WinButtons.exe, right-clicking a button offers the option to open the current configuration with WinButtonEdit.
|-d||Debug log mode, write extra debugging and logging information to WinButtons.log
Most useful if placed as first on the commandline, then also logs command line parsing.
|-d-||Debug log mode disabled.|
|-f inifile||Filemode, read configuration from inifile, instead of WinButtons.ini. -f can be ommitted.|
|-t top||Top pixel of the window that shows the buttons, -1 means vertical screen-center is used.|
|-l left||Left pixel of the window that shows the buttons, -1 means horizontal screen-center is used.|
|-w width||Width of the buttons to display. Default is 128.|
|-h height||Height of the buttons to display. Default is 128.|
|-m margin||Margin between buttons and the windows border, and between each button. Default is 2.|
|-r rows||Number of rows to separate the available buttons in. Default is 1.|
|-x||RunExit mode enabled. Closes WinButtons after a button is pressed and it's command executed.|
|-x-||RunExit mode disabled (default).|
|-v||Vertical mode enabled, draw buttons from top to bottom instead of left to right.|
|-v-||Vertical mode disabled (default).|
|-mv||Movable mode enabled, allows dragging the form across the screen, when grabbed by it's border or background, using the mouse.|
|-mv-||Movable mode disabled (default).|
|-ta||Taskbar mode enabled, show a taskbarbutton in the Windows taskbar.|
|-ta-||Taskbar mode disabled (default).|
|-b||Border enabled, show a border around the window.|
|-b-||Border disabled (default).|
|-cl||Close button enabled, show a close button on the window, the Window Border (-b) should also be enabled!|
|-cl-||Close button disabled (default).|
|-o||Ontop mode enabled, Button windows floats on top of all windows (default).|
|-o-||Ontop mode disabled.|
|-hnd handle||Add handle to the list of window handles to hide when -hide or -hidex command switch is used.|
|-e||Enable ExitOnEsc mode (default), to close the WinButtons window by pressing .|
|-e-||Disable ExitOnEsc mode, pressing won't close the WinButtons window.|
|-fs size||Fontsize for use on all buttons in points (default font is fixed at 9 pt)|
|-a||Enable ActiveExe option, to generate a list of executable names that got focus during this WinButtons session. Appended to WinButtons-active-exes.log when WinButtons is closed.|
|-ah||Enable Alternate Hide method for another way of hiding the windows. Can also be set using althide configuration setting.|
|-ah-||Disable Alternate Hide. (default)|
|-cs separator||Set an alternate Multiple Command separator string. Default is ^, proposed alternative is &&, as ^ can not be combined with -send|
|-cr||Enable CursorRestore option, to restore the cursor position to the last know position outside of the WinButtons window
Sets the 'Regular' buffersize (cursorrestore=2), if used.
|-cr-||Disable the CursorRestore option|
|-fc||Enable FlipKeyColor mode, reverts the color of button background and button caption, if these colors are set or set globally. Used to indicate the button was activated. Stays inverse while the button executes, or if it return quickly, delays to display at least 250 msec. Can also be set using the flipkeycolor configuration setting.|
|-fc-||Disable FlipKeyColor mode (default).|
|-lh pid||LastHandle option, to get a PID from another instance of WinButtons passed through the -sub command|
|-sb button||StartButton feature, set given button (number) as the Selected Button after initial display. (can be used like "-sb 4 numkeypadr.wbuc" to initially select the 'NumPad Off' 4th button from that layout).|
|-?||Help mode, display a messagebox with all available commandline options|
|Any commandline option overrides the corresponding setting from the inifile.|
|The [Settings] section:|
|This is a sample [Settings] section of the inifile, all settings are shown with their default value. It applies to the current instance of WinButtons.
None of the values need to be present to have a working configuration, the defaults will then be used.
|debug||Debug log mode enabled when set to 1|
|caption||The caption of the form showing all buttons. Border must be enabled to display the caption. Allows the use of environment variable content by using %env.varname% syntax.|
|runexit||RunExit mode. Normally after starting a command, the form stays in place, -runx command can be used to exit this instance of WinButtons or runexit set to 1|
|left||Left position of the form, -1 centers the form on the screen, after calculating the width of the form.|
|top||Top position of the form, -1 centers the form on the screen, after calculating the height of the form.|
|Dimension of the button(s) in pixels. All buttons wil have the same size. Default is 128 x 128.|
|buttonmargin||Space between the buttons and the form-borders. Default is 2.|
|vertical||Display a vertical column of buttons when set to 1.|
|border||Display a border around the form when set to 1.|
|closebutton||Display a standard Windows close button on the form. If taskbar = 0 a smaller close button is displayed.|
|taskbar||Display WinButtons in the Windows taskbar. Allows this WinBottons instance to be selected using or by mouse in the taskbar.|
|movable||Makes the form movable when set to 1.|
|buttonrows||Number of rows of buttons to display (assuming more than 1 button definition...). The count of buttons is divided by this number to determine the size of the form.
If a number of buttons is not fully divisable by this number, void spaces are displayed instead of buttons.
|ontop||Determines if the button window is foating on top of all windows, or can be hidden behind other windows. Default set to 1, disabled when set to 0.|
|winsendkeys||Specify the path/filename for WinSendKeys.exe (download from: www.donationcoder.com/forum/index.php?topic=25389.0). Not checked for existence, just executed (can be in path).
Will be read from WinButtons.ini, if not found in the current .ini file (and current file is not WinButtons.ini)
|exitonesc||When set to zero won't close the WinButtons windows when is pressed. Is read from global ini, so sub-menu's should probably provide a button to quit that menu.|
|fontsize||The global fontsize to be used for all buttons. Can be overridden by specific button fontsize setting.|
|excludeexes||The comma-separated list of exe files, not to trigger a change of button context when [Groups] are defined.|
|cmdseparator||Set the character(s) to be used as Multiple Command separator. Default is ^, proposed alternate could be &&, as ^ can not be combined with -send|
|Next three settings can be overridden per group, and color and textcolor can also be overridden per button|
|backcolor||Sets the background color of the main window, default is the current Windows standard Window background color|
|color||Sets the default button surface color, default is the current Windows standard button color|
|textcolor||Sets the default textcolor for all buttons, default is the current Windows standard text color|
|cursorrestore||Enable or disable (default) the CursorRestore feature, to restore the cursor to the last known position outside of the WinButtons window.
Can be set to values from 0 .. 4, where 0 = Off, and 1..4 determines the buffersize, 1 = Small, 2 = Regular, 3 = Medium, 4 = Large
|flipkeycolor||FlipKeyColor feature, when enabled reverts the button and text color if a button is selected, and resets the colors when the button-action is finished. If the action takes less then 250 msec, it waits the remaining milliseconds so the button is at least 250 msec reverted.
Requires colors to be set for text and button surface, either per button or globally/per group or a combination of that.
|nobuttonborder||Enables the Borderless button feature for all buttons.|
|If a setting is not found for: debug, buttonwidth, buttonheight, buttonmargin, closebutton, border, taskbar, ontop, exitonesc, winsendkeys, fontsize, excludeexes, althide, cmdseparator, backcolor, color, textcolor or cursorrestore in the current ini file, and we are not reading WinButtons.ini, then the setting is also searched in WinButtons.ini as a global configuration. Local override or command-line option always 'wins'.|
|The [Groups] section of the configuration:|
|Groups can be defined to switch the set of available buttons, based on the current application having focus. The selection is made based on the name of the exe file (no path) that is running. This information can be obtained by enabling debug mode, starting WinButtons, giving the required application focus, closing WInButtons and reading the last lines of the log file. There's a list of the executable names that had focus during the lifetime of that WinButtons session.|
|Groups have 2 parameters:|
|group<n>||The name of the group, to be used to identify the button-section. This name will be prefixed to '-Buttons' to find the correct set of buttons.
So for this group to activate, a non-empty section [scite-Buttons] must be defined, listing a set of buttons as defined in the [Buttons] section readme.
|exename<n>||A comma-separated list of names of executables that should have focus to validate the context-switch to this button-group. The check is done non-case-sensitive.
Application-exename(s) can be determined by starting WinButtons with -a commandline option, activvating the required app, closing WinButtons and retrieving the activated exename(s) from WinButtons-active-exes.log
A new feature since v3.1 is that it's possible to specify a control and a Windowtitle that should trigger the group switch. The control should be named by the ControlClassNN value, as shown by the 'AutoIt Window Spy' tool, installed with AutoIt3. The name can be a regular expression, as specified here and here. Example: Edit[1-3] to switch focus with Edit1, Edit2 or Edit3.
An optional window title should be specified between double-quotes, so it can be identified as the title. The title can be specified like the special names as described href="http://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm">here in the section 'Advanced Window Descriptions'.
The full syntax spec for this parameter is: (square brackes denote optional parts, percent sign is the separator!)
|The [Variables] section of the configuration:|
|Variables can be defined in a [Variables] section, to be later used by other [Settings] or [Buttons]/[group-Buttons] parameters or commands.
A variable could be defined like:
|This variable can then be used in a command or caption, etc., by using a ":var" prefix and a ":" suffix, for example: :varhello: or :varStdWidth:
The :var prefix is required to be lowercase, variablenames are not case-sensitive.
The variables can be used in all configuration items that do _not_ resolve to an on/off value, like vertical or movable. Only numeric and string values get variables replaced.
An example configuration is included as copymenu.ini
|Nested variables can be used, the replacement happens from inside out, like this example:|
|The use of :varStdWidth: resolves to: ":varMultiply:varStdHeight:::varStdHeight:"|
The second iteration resolves to: ":varMultiply100:100"
The third iteration resolves to: "2*100"
|Assigning this variable to buttonwidth in the [Settings] section, like below, will resolve to 200, as any calculation is also executed when reading numeric values from the configuration.|
Changing the value of stdheight to 60 will resolve in a buttonwidth of 180, and a stdheight of 40 results in buttonwidth=160.
|Variables can also process parameters. An example:|
command=:varCmd: :varSource?1=?2: :varDest?1=?2: :varFileSpec?1: :varParams:
params=/E /MOV ?1
[Buttons] button1=Copy IMPORT from &Client to Server i >>
|Parameter values are passed by using = in the variable: :varCommand=1=x: passes values "1" and "x" when parsing variable Command. These parameters can be applied in the result by using ?, like: ?1 or ?2.
These passed values can again be used as parameter value by preceding them with "=", like: :varSource?1=?2: This results in variable Source1 being fetched (the first parameter to that variable), and passing x to Source1 (the second parameter passed from the command1 button).
In Source1 this value "x" is used to determine the requested Root variable, either Root or Rootx. If parameter 2 is not passed to Command, it is defaulting to an empty string.
The maximum number of parameters that can be used is now unlimited, because of an improved way of replacing the parameters with their values.
|The [Buttons] section of the configuration:|
|Each button is required to have at least a, sequentially numbered, non-empty button<n>= value. If the text on a button should be empty, an empty caption<n>= value should be supplied.|
|Group overrides: (See Settings section)|
|button<n>||The name of the button. If no caption<n> is supplied, this is also the text displayed on the button. & can be used to define a hotkey for that button, so button1=B&utton defines <Alt-U> as a hotkey for button 1.|
|caption<n>||The caption to display on the button. If supplied it takes precedence over the standard button<n> value for display on the button. Allows an empty caption if defined as empty value. The same rules for hotkeys apply.
Captions are wrapped if no color is used, as these attributes don't play nice together (yet).
Allows the use of environment variable content by using %env.varname% syntax, and macro variable expansion using @[email protected] syntax.
|For a Borderless button, any linefeed in the caption splits it at that position. A linefeed can be specified using @[email protected], so [email protected]@Explorer would display as 2 lines, displaying Internet and Explorer below each other.|
|image<n>||An optional icon (ico) or bitmap (bmp) file to display on the button. Doesn't allow for combination of icon/bitmap and text! If a hotkey is set using an & in the button or caption setting, then that hotkey is still enabled!
When a .bmp path/filename is prefixed with a dash "-", then the bitmap is scaled to the size of the button
When using an icon, then the icon-index can be specified by adding ",<index>" (no quotes or brackets). The best choice usually is the numeric (negative) index. For .exe, .dll, .ocx and .icl files, the default index (when ommitted) is set to 0.
|When using an actual .ico file that contains multiple size icons, the best icon should be emperically determined, by trying several (usually negative) indexes, these can't be displayed by the icon selection dialog of WBE.|
|If a larger iconsize then 32x32 pixels is needed to display on a button, NirSoft's IconsExtract utility could be used to extract the desired icon to a .ico file, find the iconindex in the icon by double-clicking it in InconsExtract and selecting the indexnumber with the desired size. Then use the saved .ico file in WBE as Image, using the index shown in IconsExtract.|
|NirSoft's IconsExtract can be found here|
|When specifying a .png file (borderless buttons only!), the comma-separated index is the Opacity value that can be set on the image. Range 0..255. 0 is invisible, 255 is 100% visible.|
|When Borderless buttons are used, the filename can be prefixed with several parameters to manage the layout and size of the image:|
|!!! Attention: The list of parameters is terminated by a round brace: ) !!!|
|-||The image is stretched in the available space, if a caption is defined, space is reserved for the caption to show properly|
|<Layout>||A code for the layout of the image and caption, when both are defined.|
|0 = Image at the top, caption at the bottom, image is scaled to the button-apect-ratio, the background besides the image get the same color as the caption background, and also acts as a button
1 = Caption at the top, image at the bottom, image is scaled to the button-apect-ratio, the background besides the image get the same color as the caption background, and also acts as a button
2 = Image at the left, caption at the right, image is scaled to 1/2 width of the button, and the caption get the other half.
3 = Caption at the left, image at the right, image is scaled to 1/2 width of the button, and the caption get the other half.
4 = Like 0 but the Caption is left aligned
5 = Like 1 but the Caption is left aligned
6 = Like 2 but the Caption is left aligned
7 = Like 3 but the Caption is left aligned
8 = Like 0 but the Caption is right aligned
9 = Like 1 but the Caption is right aligned
10 = Like 2 but the Caption is right aligned
11 = Like 3 but the Caption is right aligned
|width||Explicitly set width for the image, for layouts 2 and 3 (and corresponding 6/7, 10/11) the caption is resized to fill the remaining space|
|height||Explicitly set height for the image, for layouts 2 and 3 (and corresponding 6/7, 10/11) the caption is resized to fill the remaining space|
|imageborder||Extra border-pixels around the image so the optional FlipKeycolor feature colors a border around the image to make the 'pressed' state more visible. 2 or 3 seems an appropriate value. The default and also the fallback value on wrong values is 1.|
|labelborder||Extra border-pixels around the caption. The entire caption label is reduced in size!|
|left offset||Shifts the image to right (positive value) or left (negative value) to move the button-image in the desired location. The caption is not resized by this offset!|
|top offset||Shifts the image down (positive value) or up (negative value) to move the button-image in the desired location. The caption is not resized by this offset!|
|If one of these parameters is empty it is ignored.
Spaces between parameters are allowed.
Examples can be found in metro.wbuc
|command<n>||-quit||Quit this instance of WinButtons. Ignores the rest of the command.|
|-exit||Exit after executing command, like runexit configuration parameter was set or -x commandline option used|
|-wait||Run command, wait until it's finished, and re-activate the WinButtons window.|
|-hide||Hide this WinButtons instance and any window-handles passed using -hnd option, run the command, wait for it to finish and restore WinButtons. This allows an uncluttered screen, as default WinButtons has 'always on top' parameter (ontop) set.|
|-send||Send keys specified to a named window using WinSendKeys (see winsendkeys [Settings] parameter for download including docs). Use -wait to wait for completion of WinSendKeys (not the app controlled by WinSendKeys!)|
|-sub||Start another instance of WinButtons with the parameters given. -wait is also turned on
When passing the special parameters "-lh [last]" with -sub, the secondary instance of WinButtons receives the PID of the last active application before WinButtons was activated. Allows layouts like numkeypad.wbuc to be a -sub instance, and still send keystrokes to the previously active application.
command1=-sub -lh [last] -t :top: -l :left: -w :width: -h :height: numkeypad.wbuc
command4=-sub -lh [last] -sb 4 -t :top: -l :left:-(3*:width:) -w :width: -h :height: numkeypadr.wbuc
|-nowait||Turn off -wait option (for optional use with -sub)|
|-work "workdir"||Specify a working directory for the command to execute. The path need not be quoted, unless it contains spaces. If it's not quoted, it's terminated with the first space encountered after some valid (non-space) characters.|
|The workdir path isn't explicitly checked for existence, but Windows won't start the command if it can't find that directory.
Example: (all with the same result)
command5=-hide-work "c:\tmp "Notepad
This hides WinButtons while running Notepad, which is started in C:\tmp. The extra space inside the quotes in the first example is ignored by Windows.
|-msg||Display the rest of the command as a message to the user. This can be used during debugging to display the command, instead of actually executing it. Supports an optional title text (from the default "WinButtons") by using a vertical bar (|), like -ask and -asc. Parameter -hide is implicitly set.|
|-ask "[title|]message"||Ask with a Yes/No messagebox, displaying the message, with optional title separated by | (vertical bar), confirmation of the user. On No the command won't be executed. Parameter -hide is implicitly set.|
|-asc "[title|]message"||Ask with a OK/Cancel messagebox, displaying the message, with optional title separated by | (vertical bar), confirmation of the user. On Cancel the command won't be executed. Parameter -hide is implicitly set.|
|-reload||Causes a reload of the configuration after the button is executed, assuming no -exit or runexit=1 or -x is set.|
|-refresh||Causes the WinButtons windows to be redrawn, without reloading the configuration, after the button is executed, assuming no -exit or runexit=1 or -x is set.|
|-recond||Causes all conditions to be re-evaluated ('recondition'). Is only useful with conditionmode > 0 (or combined with -dis or -vis condition options).|
|-mini||Starts the command in a minimized state. Can be used to avoid 'flashing' cmd prompts for commandline-tools that generate (ignorable) screen-output when executed.|
|If the message part starts with * then the second button is set as default button, and the * is removed.
When the button is pressed, any variables in the message or title are replaced.
-msg, -ask and -asc support the use of environment variable content by using %env.varname% syntax.
|Switches can be combined, placed side by side, or separated by a space, so a valid command like could look like:
- This hides WinButtons, and any windows passed using -hnd option, while working with Notepad, and quits after Notepad has returned to WinButtons.
command1=-wait-exit Notepad somefile.txt
- This doesn't hide WinButtons, waits for Notepad to end, and then quits WinButtons
- This runs Notepad, and makes WinButtons directly available again for further actions.
|When passing parameters to a command, it can be useful to pass information about the current location of the WinButtons window, or button just selected.
Some coordinates are avaliable with these parameters:
|:top:||top pixel of the control, ignores bordersizes so buttons can align nicely. If a sub-instance of WinButtons is started that has the same border settings, then the buttons can align exactly|
|:left:||left pixel of the control, ignores bordersizes so buttons can align nicely.|
|:right:||right pixel of the control|
|:bottom:||:top: + buttonheight|
|:btop:||button top exactly calculated.|
|:bleft:||button left exactly calculated.|
|:bright:||button right exactly calculated.|
|:wright:||window right (:wleft:+:wwidth:)|
|:wbottom:||window bottom (:wtop:+:wheight:)|
|:hndlist:||A list of all handles passed using -hnd option, and the handle of the current window, to be hidden when -hide or -hidex is used|
|:var<VarName>[=par[,..]]:||Variables with optional parameters, as explained in the [Variables] configuration section, can be used.|
|These coordinates can be used in calculations to give nice positioning (if spaces are used for readability, then the calculation should be quoted, examples from the standard WinButtons.ini) like:
command7=-sub -t :btop:+(:height:*0.75) -l ":bleft: + (:width: * .25)" :hndlist: submenu5.ini
- This places a submenu (configured using submenu5.ini) at 3/4 down the height of the selected button, and 1/4 to the right, overlapping a large part of the button, but leaving the caption visible. It also passes the list of handles to hide if -hide is used.
command8=-sub -x -t :top: -l :right: submenu4.ini
- This places a submenu on top of the selected button, overlapping it exactly, assuming both use the same border, taskbar and buttonsize settings
|Command<n> supports the use of environment variable content by using %env.varname% syntax. (Useful for paths to user-specific directories)|
|If multiple commands need to be sent by 1 buttonpress, then they should be separated by a ^ or an alternative set with -cs commandline option or cmdseparator setting, so if we need to create 2 directories, this can be configured like this:
command1=-wait cmd /c md c:\directory1^cmd /c md c:\directory2
The second command can run in parallel with the first if no -wait is used!
Only the last return value is 'preserved' (logged if -d or debug was set).
Multiple commands can only properly be combined with -send if and alternate for ^ as a command separator is set using cmdseparator setting or -cs commandline option.
|color<n>||Change the button surface color. Color values in rgb, most easy is to use hexadecimal notation with 0x prefix, like 0xff0000 for red.|
|textcolor<n>||Change the caption color of the button, same notation as color parameter. Colors can't currently be combined with a button image.|
|buttonheight<n>||Change the height of this button only. If it's taller then the global buttonheight setting, then only this button will be taller, but all other buttons get a bigger margin.|
|buttonwidth<n>||Change the width of this button only. If it's wider then the global buttonwidth setting, then only this button will be wider, but all other buttons get a bigger margin.
If these values differ from the global buttonheight/buttonwidth values, then this button will be differently sized, and smaller button(s) will be centered in the available space.
If a larger margin between buttons and/or the border is needed, then [Settings] value for buttonmargin should be increased, instead of giving all buttons a different size.
|buttonarrangement<n>||Determine how the button is grouped/sized within a buttonarea.
Possible values: 1, 2, -2, 3, -3, 4, 6, -6, 9
|1||The current button is extended into the next buttonarea, it's possible to have the rest of the buttons fall off the window...|
|2||The buttonarea is split horizontally in 2, so 2 buttons can be placed into 1 buttonarea, can be combined with 3, 4, 6 and 9, vertical on with -3, 4, -6 and 9|
|-2||The buttonarea is split vertically in 2, so 2 buttons can be placed into 1 buttonarea, can be combined with -3, 4, -6 and 9, vertical on with 3, 4, 6 and 9|
|3||The buttonarea is split horizontally in 3, so 3 buttons can be placed into 1 buttonarea, can be combined with 2, 4, 6 and 9, vertical on with -2, 4, -6 and 9|
|-3||The buttonarea is split vertically in 3, so 3 buttons can be placed into 1 buttonarea, can be combined with -2, 4, -6 and 9, vertical on with 2, 4, 6 and 9|
|4||The buttonarea is divided into 4 equal parts, so 4 buttons can be placed into 1 buttonarea, can be combined with 2, 3, 6 and 9, vertical on with -2, -3, -6 and 9|
|6||The buttonarea is divided into 6 parts, 2 horizontal rows, vertically divided into 3 equal parts, and 6 buttons can be placed into 1 buttonarea, can be combined with 2, 3, 4 and 9, vertical on with -2, -3, 4 and 9|
|-6||The buttonarea is divided into 6 parts, 2 vertical rows, horizontally divided into 3 equal parts, and 6 buttons can be placed into 1 buttonarea, can be combined with -2, -3, 4 and 9, vertical on with 2, 3, 4 and 9|
|9||The buttonarea is divided into 9 equal parts, so 9 buttons can be placed into 1 buttonarea, can be combined with 2, -2, 3, -3, 4, 6 and -6, also with vertical on|
|Several combinations of buttons can be made, so 3x 9, 1x 3 and 3x 9 will fill 1 buttonarea, but 3x 6 and 1x 2 also fill a buttonarea. Experimenting is the best way to find the best way to see if it fits your need.|
|When buttonwidth and/or buttonheight are smaller then the calculated buttonsize, then the smaller of the sizes will be used.
These smaller buttons are combined/calculated using the default calculated sizes, not the actual sizes, that's for another release, if required.
|The buttonarrangement type 4 and 9 buttons are drawn from left to right, top to bottom when vertical is off, and from top to bottom, left to right when vertical is on.|
|fontsize<n>||The size of the font in points, used for this button only. By default the [Settings] value of fontsize will be used, which defaults to 9pt.|
|condition<n>||A condition that has to return true for the button to be displayed.
Valid condition options are:
|-vis||Set ConditionMode for this button to 1, show/hide the button on condition change. See conditionmode<n> 1 below for more info.|
|-dis||Set ConditionMode for this button to 2, enable/disable the button on condition change. See conditionmode<n> 2 below for more info.|
|-ref||Refresh condition evaluation every 1/10th second. Having too many -ref conditions can cause performance/responsiveness issues!|
|-file"dir or filespec"||Check for existence of a directory or file specification. Quotes are advised to be used, to accomodate for spaces in names, else the first space is used as a separator.|
|-exe"executable name"||Check for "executable name" (no path should be specified), or a comma-separated list of executables (checked using 'OR' logical condition), to be active in memory. If 'AND' logical condition is required, then use multiple -exe combined with -and options.
This check is performed at startup, but also when a new process is started, or some process has closed. -ref is not needed for this condition to be re-checked.
|-au3"AutoIt3 functionblock"||Provide a valid AutoIt function block that results in a logical or numeric (0 : false, 0 : true) value. Use @[email protected] notation to check specific macro values, documentation
Use -ref to refresh this condition if a dynamic macro value, like @[email protected] or @[email protected] is used.
|-not, -and, -or||Conditional keywords to tie conditions together or invert (-not). Be sure to add a condition after these options to get a valid logical result!|
|(, )||Use round brackets to group conditions together. Be sure to match the correct number of round brackets to get a valid logical result!|
|In the condition statement, all :var: variables, macro expansion using @[email protected] and environment variables using %env.variable% are supported.
When -exe is used, every time a process is started or stopped, the list of conditions that contains a -exe is re-evaluated.
When -ref is used, every 1/10th second, the list of conditions that contains a -ref is re-evaluated. This might drain performance! A 'flashing' button can be realized by using:
condition1=-dis-ref-au3"mod(@[email protected],2) = 0"
Examples are in copymenu.ini
An invalid, but non-empty, condition always evaluates to False, so the button won't be displayed or will be disabled!
|1||The condition shows/hides the button. If the condition is false an empty spot is displayed. Can also be set by condition option -vis.|
|conditionmode<n>||2||The condition enables/disables the button. If the condition is false a greyed-out button is displayed. Can also be set by condition option -dis.|
|0||The entire WinButtons window is re-drawn (giving screen-flicker) if a button-condition changes state. (default)|
|nobuttonborder<n>||Sets the Borderless option for this button, if not set by the Global ([Settings] section) or Group parameter nobuttonborder.
A borderless button can combine a caption and an image on 1 button, has several layout options like image left, caption right, etc. More info at the description for image<n>
- 193 Downloads
- 1.69 MB File Size
- October 23, 2012 Release Date
- n/a Creation Date
- n/a Requirements