Search code examples
automationx11autohotkeywindow-managers

why don't more programming languages have builtin interfaces to the window manager?


Programming is at the heart about automating tasks on a computer.
Presumably those tasks would normally be done manually by a human.
Humans use the computer through the keyboard, mouse, and interaction with the console or the window manager.
But very few languages have built in functions that provide an interface to these basic computing objects.

A notable exception is autohotkey, an open source language on windows, providing builtin functions that allow the following simple tasks:
* Get Pixel Information
* Get mouse position
* Keyboard macros
* Simulate key strokes
* Simulate mouse click
* Window management
See examples on rosettacode.

There have been various attempts on linux, many of which were stopped without explanation. One is the inactive tcl library: android. Search google code for android, lang:tcl


Solution

  • I write web server code. No human being interacts with the code. It's simply a lot of complex plug-ins to Apache.

    "Humans use the computer through the keyboard, mouse, and interaction with the console or the window manager. "

    This is completely false in my case. The "user" sends requests through HTTP. No keyboard, no mouse, no console, no window manager.

    The user may be using some kind of fancy GUI, but it doesn't matter to me or my software. All I see are HTTP GET and POST requests. Pure text.

    "But very few languages have built in functions that provide an interface to these basic computing objects."

    Correct. I have no use for keyboard, mouse, console or window manager.