WinTclSend INSTRUCTIONS

1. COMMANDS :


The available commands are :

New in version 1.5

Due to confilcts with the Tcl command "list", I've renamed the command ::wind::list to ::wind::wlist.  Please update your scripts.  Sorry for this.
::wind::list       ::wind::wlist

New commands:
::wind::state <window name>         to get the status of a window (Maximized, Minimized or Normal)

::wind::show2 <window name>      to put in active a window (without the blinking effect)
                                                             This is a "touchy" work arround.
                                                             It's possible that this not run correctly on all kind of machines.
                                                             That run on my Windows98, but seams not to run on other machines.
                                                             This will not replace the "old" command ::wind::show.

The Facilities for package loading and version control are implemented.  Now, use the command "package require wind" to load the extension.  The "old way" (via the command load) in still available, but you can not use the commands written in pure Tcl (defined here in green).

Due to the Package functionnalities, you have now, new commands (written in pure Tcl), like :
::wind::windwait <window name> [<max wait>]   to wait a specific window on the foreground.
                                                             Max wait is in seconds and the default value is 5.

::wind::minimizeAll                        to minimize all the windows
 

In version 1.4
All the commands related to the mouse are renamed.
::wind::lclick       ::wind::cur_lclick
::wind::rclick      ::wind::cur_rclick
::wind::mclick      ::wind::cur_mclick
::wind::setpos <x> <y>      ::wind::cur_setpos <x> <y>
::wind::getpos      ::wind::cur_getpos

To get the cursor postion based on the position of the foreground window
::wind::cur_getwpos

To set the cursor postion based on the position of the foreground window
::wind::cur_setwpos <x> <y>

To get the text of the element (some buttons, a Excel Book, ...) under the mouse.
That work even if it's outside the foreground window.
::wind::cur_getelemtext

To get the name of the Parent window under the mouse
That work even if it's outside the foreground window.
::wind::cur_getwindtext

To get the size of the element (some buttons, a Excel Book, ...) under the mouse.
That work even if it's outside the foreground window.
If you want to know the size of a window in background, set the mouse on the title bar of that window.
::wind::cur_getelemsize

To get the size and position of the foreground window.
::wind::getwindsize

To set the size and position of the foreground window
::wind::setwindsize <x> <y> <w> <h>

The command ::wind::cur_setpos, ::wind::cur_setwpos, and ::wind::setwindsize accept list as input.
That means you can do the following code :
         set pp [::wind::cur_getwpos]
         ::wind::cur_setwpos $pp
or
         set pp [::wind::cur_getpos]
         ::wind::cur_setpos $pp
or
        set cc [::wind::getwindsize]
        ::wind::setwindsize $cc
 
 

In version 1.3
to simulate a left click on the mouse
::wind::lclick

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

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

to set the mouse position
::wind::setpos <x> <y>
where the starting position (0 0) is the upper left corner

to get the mouse position
::wind::getpos

to restore the foreground window at the original size
::wind::restore

to minimize the foreground window
::wind::minimize

to maximize the foreground window
::wind::maximize

to check how many days are remaining before the end of the trial-period.
::wind::test
 

In version 1.2
to have a list of all opened windows
::wind::list
Will show you a Tcl list with all the window's name
 

In version 1.1
to send a text to the foreground window
::wind::send <text to send> [<sleep>] [<timeout>]
If you want send more than one word, enclose your text into { and }.
The "sleep" and "timeout" parameters are optional.
Sleep is to ask to the system to wait before each character sent.
A sort of delay in milliseconds.
Timeout is to ask to the system to wait some milliseconds after sending the string.

to put in active a window
::wind::show <window name>
Search into the list of active window's name and execute a "restore" like command to set in foreground this window.

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

to get the content of the clipboard
::wind::getcb

to put strings into the clipboard
::wind::putcb <string>
 
 

2. SPECIAL CHARACTERS :


You have the possibility to send some special characters.  For example ctrl+c, ctrl+o, PF4, ...

To distinguish a normal string from a special character, you must enclose it between pipes(the character |).

For example, if you want to send ctrl+c, you must send the following string : "|CTRL+|c|CTRL-|".  This say that you want type the character "CTRL", hold that key, type "c", and release "CTRL".

If you want to send the pipe character, send |||.
 
 

3. SPECIAL CHARACTER LIST:


"ALT+" press ALT
"ALT-" release ALT
"ALTL+" press left ALT key
"ALTL-" release left ALT key
"ALTR+" press right ALT key
"ALTR-" release right ALT key

"CTRL+" press CTRL
"CTRL-" release CTRL
"CTRLL+" press left CTRL key
"CTRLL-" release left CTRL key
"CTRLR+" press right CTRL key
"CTRLR-" release right CTRL key

"SHIFT+" press SHIFT
"SHIFT-" release SHIFT
"SHIFTL+" press left SHIFT key
"SHIFTL-" release left SHIFT key
"SHIFTR+" press right SHIFT key
"SHIFTR-" release right SHIFT key

"TAB" press the tabulation key
"RET" press the return key
"ESC" press the escape key

"BACK" press the backward key
"DEL" press the delete key
"INS" press the insert key
"HELP" press the help key

"LEFT" send the cursor to the left
"RIGHT" send the cursor to the right
"UP" send the cursor to up
"DOWN" send the cursor to down
"PGUP" press the page up key
"PGDN" press the page down key
"HOME" press the home key
"END" press the end key

"F1" press the function key F1
"F2" press the function key F2
"F3" press the function key F3
"F4" press the function key F4
"F5" press the function key F5
"F6" press the function key F6
"F7" press the function key F7
"F8" press the function key F8
"F9" press the function key F9
"F10" press the function key F10
"F11" press the function key F11
"F12" press the function key F12

"NUM0" press the 0 on the key pad
"NUM1" press the 1 on the key pad
"NUM2" press the 2 on the key pad
"NUM3" press the 3 on the key pad
"NUM4" press the 4 on the key pad
"NUM5" press the 5 on the key pad
"NUM6" press the 6 on the key pad
"NUM7" press the 7 on the key pad
"NUM8" press the 8 on the key pad
"NUM9" press the 9 on the key pad

"NUM*" press the * on the key pad
"NUM+" press the + on the key pad
"NUM-" press the - on the key pad
"NUM," press the , on the key pad
"NUM/" press the / on the key pad
 
 


Back to home