cwind


1. COMMANDS :

The available commands are : 

In version 1.4

to simulate a left click on the mouse
::cwind::lclick

to simulate a right click on the mouse
::cwind::rclick

to simulate a middle click on the mouse
::cwind::mclick

to set the mouse position
::cwind::setpos  
where the starting position (0 0) is the upper left corner

to get the mouse position
::cwind::getpos

to get the cursor postion based on the position of the foreground window
::cwind::getwpos

to set the cursor postion based on the position of the foreground window
::cwind::setwpos  

In version 1.3

to send a message to the foreground window.
::cwind::sendmessage  ?? ??
Message name is the windows's message to be sent.
Wparam and lparam are additional value.

to post a message to the foreground window.
::cwind::postmessage  ?? ??
Message name is the windows's message to be posted.
Wparam and lparam are additional value.

In version 1.2

I've expanded the specification of some commands for MDI.

to put in active a window.
::cwind::show ?-exact? 
Search into the list of active window's name and set in foreground this window.
Window's name is treated as a glob-style pattern.
Window's name is specified in list form,
The first element is a parent window name and the optional second element is a MDI child window name. 

to get the status of a window (Maximized, Minimized or Normal).
::cwind::state ?-exact? 
Window's name is treated as a glob-style pattern.
Window's name is specified in list form,
The first element is a parent window name and the optional second element is a MDI child window name. 

to have a list of all opened windows.
::cwind::wlist ?-exact? ??
If Window's name is omitted, Will show you a Tcl list with all the window's name.
If Window's name is specified, Will show you a Tcl list with all the MDI child window's name.
Window's name is treated as a glob-style pattern.

In version 1.1

Due to confilcts with the Tcl command "list",
I've renamed the command ::cwind::list to ::cwind::wlist.
::cwind::wlist

to get the status of a window (Maximized, Minimized or Normal).
::cwind::state ?-exact? 
Window's name is treated as a glob-style pattern.

to restore the foreground window at the original size.
::cwind::restore

to minimize the foreground window.
::cwind::minimize

to maximize the foreground window.
::cwind::maximize

to minimize all the windows.
::cwind::minimizeAll

to wait a specific window on the foreground.
::cwind::waitwind  ??
Max wait is in seconds and the default value is 5.
Window's name is treated as a glob-style pattern.

In version 1.0

to send a text to the foreground window.
::cwind::send  ...
Send the arguments, separated by spaces.
If you want send the spaces, enclose your text into { and }.

to put in active a window.
::cwind::show ?-exact? 
Search into the list of active window's name and set in foreground this window.
Window's name is treated as a glob-style pattern.

to get the active window name.
::cwind::gettext
Get the test of the foreground window.

to get the content of the clipboard.
::cwind::getcb

to put strings into the clipboard.
::cwind::putcb 

to have a list of all opened windows.
::cwind::list
Will show you a Tcl list with all the window's name.

to set the sleep time.
::cwind::sleeptime ?