WSO (WindowSystemObject)

Post your working scripts, libraries and tools
Posts: 1414
Joined: 22 Jan 2017, 19:37

WSO (WindowSystemObject)

10 Jan 2019, 19:13

(This is not in the Other Utilities section because I'm really only interested in using it with AHK). Today I found WindowSystemObject. The binaries and source and be downloaded from there (32-bit and 64-bit DLLs, which for some reason get installed in "Program Files" and "Program Files (x86)", even though the dlls are the only file in either folder! The installer does register the COM objects, however.

From the project home page:
Main features:

Full set of features for creating window interfaces. Supports all standard windows controls.
ActiveX support (Internet Explorer, Windows Media Player and other).
It supports working with popular image formats that are BMP, JPEG, WMF, GIF.
WSO is a language-independent library. Only COM (Automation) support required.
Intuitive object model.
Events model.
Rich set of Windows API constants is available as properties. An constant can be used by its name.
Docking Framework.
Visual Form Designer
Supports Windows 98SE, ME, NT 4, 2000, XP, 2003, Vista, 2008, 7, 2008 R2, 8, 8.1, 10.

Rich set of samples for different languages included in the distributive:

Using ActiveScript.ahk it can be automated - I have tried to do it using only ComObjCreate, i.e.

Code: Select all

obj := ComObjCreate("Scripting.WindowSystemObject")
which works, but I haven't figured out how deal with the event handlers yet. Any and all pointers (no pun intended) as to how to deal with WSO's event handlers purely in AHK will be vastly appreciated!

There is some extraneous testing code in the script below. An animated GIF is attached.

Perhaps of more interest is the information I got from running "tlibimp -P wso.dll" and "tlibimp -C wso.dll": If you're curious, see the dumps attached. There is a wealth of information.

The working code is below (as I mentioned, it needs ActiveScript.ahk, although you could probably do without it if you use a 32-bit ScriptControl - I haven't tried that, though).
WSO.gif (241.32 KiB) Viewed 2795 times
(496.18 KiB) Downloaded 122 times
Posts: 1600
Joined: 01 Oct 2013, 14:57

Re: WSO (WindowSystemObject)

11 Jan 2019, 02:14

Wow, this component can do so many things. Thanks for posting!

Code: Select all

wso := ComObjCreate("Scripting.WindowSystemObject")

Form := Wso.CreateForm(0, 0, 300, 100)

Button := Form.CreateButton(10, 10, 75, 25, "Close")
Button.OnClick := Func("ButtonClick")



ButtonClick(this) {
	global Form
	MsgBox, bye
Posts: 1414
Joined: 22 Jan 2017, 19:37

Re: WSO (WindowSystemObject)

15 May 2019, 23:55

@tmplinshi, I just saw this post of yours now for some reason. A special thanks to you for giving me a way to translate things like

Code: Select all

HelpMenu.Add("About","F1").OnExecute = GetRef("HelpAbout")
in VBScript to

Code: Select all

HelpMenu.Add("About","F1").OnExecute := Func("HelpAbout")
in AHK. There are many examples of this in the code attached.

I was going to include the DLL in the attached archive, but it's probably better to install the thing if you're going work with WSO, so the COM gets registered. You can get WindowSystemObject at this link, look for WSO on the left.

Just another Notepad clone in AHK :) You need the file WSOConsts.ahk in the archive to be in script dir.
WSO Edit.gif
WSO Edit.gif (295.83 KiB) Viewed 2392 times
(8.99 KiB) Downloaded 82 times
Posts: 1414
Joined: 22 Jan 2017, 19:37

Re: WSO (WindowSystemObject)

19 May 2019, 13:41


This is **Almost** working in AutoHotkey code also, instead of just executing JS as here, but I don't quite have it (95%). But I thought it was too wild to not share right away, so here is the JS version.
Using ActiveScript.ahk, attached just in case, the file 'ascript.ahk' runs 'littledoc.js'. I've included the WSO contants file again also, but the DLL is NOT here. See post above for installation links.

BTW, so far the JS version loads much faster than my AHK version, although I can't tell much difference between them after loading. I was surprised.

P.S. Sorry about the artefacts (or artifacts, depending on which side of the pond you're on :)) in the GIF.
WSO Dock 2.gif
WSO Dock 2.gif (547.05 KiB) Viewed 2273 times
(10.78 KiB) Downloaded 76 times
Posts: 1414
Joined: 22 Jan 2017, 19:37

Re: WSO (WindowSystemObject)

21 May 2019, 14:34

ListView related - called "workareas", from the WSO docs. Still need to install WSO from links above, of course.
LV workareas.PNG
LV workareas.PNG (34.13 KiB) Viewed 2194 times
Posts: 1414
Joined: 22 Jan 2017, 19:37

Re: WSO (WindowSystemObject)

22 May 2019, 19:04

I like non-rectangular GUIs, here's one using WSO that only took about 50 lines of code. Again, DLLs not included. See link above.
Region.gif (5.65 KiB) Viewed 2136 times
User avatar
Posts: 190
Joined: 01 Sep 2017, 02:38
GitHub: elModo7
Location: Spain

Re: WSO (WindowSystemObject)

28 May 2019, 02:46

Man, this is great thanks for posting it!

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Google [Bot] and 23 guests