|
|
|
NirCmd Command Reference - win
|
win [action] [find] [window to find] [Additional Parameters]
For child windows:
win child [find] [top window to find] [action] [find] [child window to find] [Additional Parameters]
This command allows you to close, hide, show, maximize, and minimize the specified window.
The parameters:
- [action]: The action you want to do on the specified window:
- child: Allows you to make an action on child window of the specified top-level window.
- close: Closes the specified windows.
- hide: Hides the specified windows.
- show: Shows again the specified windows. (after hiding it with 'hide' command)
- hideshow: Hides the specified windows and then shows it again. You can use this action to repaint the content of a window.
- togglehide: Toggles the specified windows between visible and hidden state.
- activate: Bring the specified window to the front.
- flash: Flashes the specified window.
the values in [Additional Parameters]
specifies the number of flashes (the default is 5) and the number of milliseconds of every flash.
- max: Maximizes the specified windows.
- min: Minimizes the specified windows.
- normal: Restores the specified windows to normal state, after minimizing or maximizing them.
- togglemin: Toggles the specified windows between minimized and normal state.
- togglemax: Toggles the specified windows between maximized and normal state.
- trans: Make the specified windows transparent.
the value in [Additional Parameters] is a number between 0 and 255 that specifies the
transparency level. 0 = completely transparent. 255 = completely opaque.
- setsize: Set the size of the specified windows.
the values in [Additional Parameters]
specifies the desired window size - x, y, width, height.
- move: move/resize the window.
the values in [Additional Parameters]
specifies the number of pixels to move/change: x, y, width, height.
- center: Center the specified windows.
- settopmost:Set the top-most state of the specified windows.
If the value in [Additional Parameters] is 1,
the specified windows will become top-most windows, if the value is 0, the top-most state
will be canceled.
- redraw: Redraw the specified windows.
- settext: Modify the caption/title of the specified windows.
- focus: Set the focus to the specified window.
- disable: Disable the specified window.
- enable: Enable the specified window.
- toggledisable: Toggles the specified windows between disabled and enabled state.
- +style: Add style bits to the specified window. The value of [Additional Parameters] specifies the style bits to add.
- -style: Remove style bits from the specified window. The value of [Additional Parameters] specifies the style bits to remove.
- +exstyle: Add extended style bits to the specified window. The value of [Additional Parameters] specifies the extended style bits to add.
- -exstyle: Remove extended style bits from the specified window. The value of [Additional Parameters] specifies the extended style bits to remove.
- postmsg: Post a message to the specified window. The 3 values in [Additional Parameters] specifies the message parameters: Msg, wParam, lParam.
- sendmsg: Send a message to the specified window. The 3 values in [Additional Parameters] specifies the message parameters: Msg, wParam, lParam.
- dlgclick: Send a click command to the button inside a dialog-box. The value in [Additional Parameters] should specify the control ID of the button,
or one of the following predefined buttons: yes, no, ok, cancel, retry, ignore, close, help.
- dlgsettext: Set the text to the specified control inside a dialog-box. The value in [Additional Parameters] should specify the control ID.
- dlgsetfocus: Set the focus to the specified control inside a dialog-box. The value in [Additional Parameters] should specify the control ID
- [find]: The method to find the window
- handle: Finds the desired window by specifying the handle
of the window in [window to find] parameter.
- id: Finds the desired child window by specifying the id of the child window.
Useful only for child windows.
- class: Finds the desired window by specifying the class
name of the window in [window to find] parameter.
- title: Finds the desired window by specifying the
exact title of the window in [window to find] parameter.
- stitle: Finds the desired window by specifying the
first few characters of the window in [window to find] parameter.
- ititle: Finds the desired window by specifying
a sequence of characters that exists in the window title.
- etitle: Finds the desired window by specifying the
last few characters of the window in [window to find] parameter.
- alltop: All top windows.
- alltopnodesktop: All top windows, except of desktop and tray windows.
- active: The current active window.
- foreground: The window in foreground.
- desktop: The desktop window
- process:Finds the desired window by specifying process ID (for example: /3412) or process name
(for example: firefox.exe).
- [window to find]:
Specifies the window by handle, class name, or title, according to the value of the
previous parameter.
Examples:
win close title "calculator"
win hide stitle "calculat"
win hide ititle "culat"
win show class "SciCalc"
win activate title "my computer"
win flash title "calculator" 10 500
win max handle 0x00009c01
win redraw alltop
win trans ititle "internet explorer" 192
win setsize class "IEFrame" 50 50 400 300
win settopmost class "SciCalc" 1
win child class "Shell_TrayWnd" hide class "button"
win child class "Shell_TrayWnd" show class "button"
win child title "calculator" hide id 128
win -style title "my computer" 0x00C00000
win child title "my computer" +exstyle all 0x00400000
win sendmsg title "calculator" 0x10 0 0
win dlgclick class "#32770" cancel
win max process firefox.exe
win max process /1275
win togglehide class MozillaWindowClass
Other commands:
NirCmd Web Page
Download NirCmd
NirSoft Web Site
|
|
|