Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANNOUNCE: Tcl Windows API 2.0.9 (alpha) released

3 views
Skip to first unread message

pal...@yahoo.com

unread,
Apr 11, 2008, 12:06:18 AM4/11/08
to
Announcing another work-in-progress release of the Tcl Windows API
extension (TWAPI). The commands new to 2.0 are still subject to change
(although not likely).

If you are using Tcl 8.5, you are strongly encouraged to upgrade from
earlier releases. If you are still using 8.4, upgrading from 1.1 is
still recommended as several bugs have been fixed in addition to the
enhancements.

V2.0 changes
------------------
Major features since V1.1 include support for writing Windows services
in Tcl, interfaces to the MS Installer, clipboard and device
monitoring, Crypto/SSPI interfaces and power management. On the
downside, NT 4.0 support has
been dropped.

See http://twapi.magicsplat.com/versionhistory.html for a full list.

Need volunteers
---------------------
If you can run the TWAPI test scripts on Vista, please post back here.
I don't
have access to any Vista systems.

TWAPI Summary
--------------

The Tcl Windows API (TWAPI) 2.0 extension provides
access to over 450 functions in the Windows API
from within the Tcl scripting language. The extension
targets Windows 2000, Windows XP and Windows
2003, and is not supported on the Windows
95/98/ME platforms and NT 4.0. TWAPI is currently
untested on Vista.

Functions in the following areas are implemented:

* System functions including OS and CPU information,
shutdown and message formatting
* User and group management
* Security and resource access control
* Window management
* User input: generate key/mouse input and hotkeys
* Basic sound playback functions
* Windows services including services in Tcl
* Windows event log access
* Process and thread management
* Directory change monitoring
* Lan Manager and file and print shares
* Drive information, file system types etc.
* Network configuration and statistics
* Network connection monitoring and control
* Clipboard access and monitoring
* Console mode functions
* System performance data
* Window stations and desktops
* Internationalization
* Task scheduling
* Shell functions for shortcuts, themes, dialogs
* COM client support
* Crypto/SSPI support
* Power managment
* MS Installer interfaces
* Device monitoring

USCode

unread,
Apr 11, 2008, 11:59:23 AM4/11/08
to
pal...@yahoo.com wrote:
> Announcing another work-in-progress release of the Tcl Windows API
> extension (TWAPI). The commands new to 2.0 are still subject to change
> (although not likely).
>
I've yet had occasion to use TWAPI but it seems like a very valuable and
useful extension for Windows-only Tcl users ... thanks for all the
terrific work!

Roy Terry

unread,
Apr 11, 2008, 12:20:51 PM4/11/08
to
On Apr 10, 9:06 pm, "palm...@yahoo.com" <palm...@yahoo.com> wrote:
> Announcing another work-in-progress release of the Tcl Windows API
> extension (TWAPI). The commands new to 2.0 are still subject to change
> (although not likely).
>
> If you are using Tcl 8.5, you are strongly encouraged to upgrade from
> earlier releases. If you are still using 8.4, upgrading from 1.1 is
> still recommended as several bugs have been fixed in addition to the
> enhancements.
>
> V2.0 changes
> ------------------
> Major features since V1.1 include support for writing Windows services
> in Tcl, interfaces to the MS Installer, clipboard and device
> monitoring, Crypto/SSPI interfaces and power management. On the
> downside, NT 4.0 support has
> been dropped.
>
> Seehttp://twapi.magicsplat.com/versionhistory.htmlfor a full list.

Great to see another version, I especially appreciate the
various monitoring functions and also expanded clipboard support.

Thanks,
Roy

Jeff Hobbs

unread,
Apr 11, 2008, 4:48:05 PM4/11/08
to
On Apr 10, 9:06 pm, "palm...@yahoo.com" <palm...@yahoo.com> wrote:
> V2.0 changes
> ------------------
> Major features since V1.1 include support for writing Windows services
> in Tcl, interfaces to the MS Installer, clipboard and device
> monitoring, Crypto/SSPI interfaces and power management. On the
> downside, NT 4.0 support has been dropped.

Since you worked on some clipboard stuff, I don't suppose anything
there could be moved into the core to address the text-only
limitations Tk Windows clipboard handling currently does?

Jeff

USCode

unread,
Apr 11, 2008, 5:36:24 PM4/11/08
to
Good point, that would be great if the Windows clipboard could be
enhanced to be on par with the other platforms:
http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/db6b0b6487f7a7ac/20b5e756cae79cab?lnk=st&q=#20b5e756cae79cab

pal...@yahoo.com

unread,
Apr 11, 2008, 11:33:29 PM4/11/08
to

The Clipboard API was one of the simplest interfaces. In fact, so
simple, I did not have to write any code for it, just passed a few
Win32 API's to SWIG which generated the wrappers. Taking a look at
tkWinClipboard.c, I would think it would be just a question of adding
tests to check for formats other than CF_UNICODETEXT / CF_TEXT.

I suspect you are looking for something more sophisticated than what
TWAPI implements. Note twapi does not do any formatting itself (e.g.
to decode html or bitmaps etc.) It punts on that and expects the
application code to do the hard work, treating the data itself as just
a binary blob and sticking it into the clipboard with the format
identifier given by the application.

/Ashok

George Peter Staplin

unread,
Apr 12, 2008, 11:40:22 AM4/12/08
to


Interesting. I'll have to checkout this code for NexTk's ntk.dll. For
a while now I've had a design idea of several ntk commands relating to
the Windows clipboard. I have a partial implementation that is
untested.

The idea is that it will work something like this:

set type [ntk-get-clipboard-type $winid]

switch -- $type {
image {
#This would translate the Windows clipboard contents to
#a megaimage buffer of RGBA bytes.
#It should also be portable so it should work with X11 too,
#so that we can work with tools like the Gimp.
set mbuf [ntk-get-clipboard-image $winid]
}

text {
#This uses the unicode text (if available).
set text [ntk-get-clipboard-text $winid]
}

none {
#empty clipboard
}
}


The X clipboard stuff is maddening. There are several ways of
implementing the X clipboard protocol. I can see now why X selection is
so broken with some toolkits, and others don't handle selections
well.


George

USCode

unread,
Apr 12, 2008, 1:05:43 PM4/12/08
to
pal...@yahoo.com wrote:
> I suspect you are looking for something more sophisticated than what
> TWAPI implements. Note twapi does not do any formatting itself (e.g.
> to decode html or bitmaps etc.) It punts on that and expects the
> application code to do the hard work, treating the data itself as just
> a binary blob and sticking it into the clipboard with the format
> identifier given by the application.
>
That's adequate, isn't it? Isn't that about all the other platforms do?
Just the ability to move that binary data around would be handy.
0 new messages