I feel all dirty inside.

Because I use this program that idiotically doesn't have an option to auto-connect at startup, but instead requires you to click a button, I just wrote a script that:

  • finds that window on the screen by its title;
  • finds the position of the third subwindow of its first subwindow;
  • moves the mouse there;
  • generates a mouse-click event.

I am utterly repulsed by this, but it works (for now), and hopefully when I have a power failure in the future (as tonight), then my home icecast stream will re-start automatically instead of staying dead until I come home and click the shiny, candy-like button.

Tags: , ,

12 Responses:

  1. waider says:

    Hmm. I don't have this (or a use for this) but does running xmms with the -p flag (start playing current playlist) not work?

    It's got less hack value, of course, but hey.

  2. supersat says:

    Why not just modify the source? More work?

    • jwz says:

      I find that these days I will go to great lengths to avoid ever trying to debug code written by other people. I get no joy from it. I run compilers as little as possible.

  3. hfx_ben says:

    The GUI equivalent of a keyboard stuffer?
    Yesterday, talking to a friend about how his clients accept his site designs and then load frontpage with mounds of slow-loading gack, we talked about the evolution of the field, as in, "Really, what have we done that's new in the last two decades?" I had never thought about it that wasy ... GUI was new, a while back, but ...what else?

    How come out super-fast hardware and super-powerful software acts so dumb? It's been lobotomized. Or, more accurately, it has no frontal lobes, other than us. So, as in your case, the "script" emulates the user!
    *I'm rambling, I know ... I can't get MozBlog or LiveLizard to work on Phoenix!*

    • pexor says:

      Or, more accurately, it has no frontal lobes, other than us.

      Well, that's exactly right. More precisely, though, the interfaces are written by humans. See, there are an awful lot of people who write software these days. Unfortunately, there are far fewer people who have the intellectual capacity to write *good* software with *good* interfaces. The barrier to entry into the software industry is still low enough that any goober can download a Visual Studio ISO or install RedHat Linux, slam together some code, and call it an application. "Development" these days is usual someone hacking out some code, and then stepping through it ad infinitum until the bug quotient seems sufficiently low enough for the software to be deemed "done". Hey, I don't begrudge anyone their attempt at something new.

      What it means, however, is that not only must the discerning user careful select the software he wishes to use, but he must weigh that selection against prevailing popularity of competing products, and therefore consider the likelihood of continuing support for any truly good product. So on the one hand, I'm glad that a capable developer can enter the field without too much trouble. On the other hand, too many boneheads also hop on the wagon, and the mindless masses often end up choosing the boneheads' software. What I'm hoping is that the industry bubble will pop, just like the stock market bubble popped a couple years ago, and all the tourists will go home. Then the qualified developers (I hope I'm one of them) can get to work.

      • hfx_ben says:

        Speaking of bubbles, parenthetically: Dolphins and Humans find a Common Art Form?

        Thanks for the response, Matt ... sometimes less than succinct is richer, like brainstorming, but you found the thread I was niggling at (a stream of meme bubbles?)
        I don't want to overspecify, but I find sometihng inspiring in the fact that JwZ's solution to that "no autostart" problem was so at hand; the GUI macro capability plugged the hole in the XMMS functionality, guided by a pair of real special lobes.
        (BTW I'm using the e-mail reply form for the 1st time ... apologies if this spews.))

  4. cadmus says:

    Wow. That reads like some of the brain dead automation I've written as a software tester.

  5. bluce says:

    I believe <lj user="uke"> worked around a similar problem by writing some kind of python interface to XMMS. You might want to ask him about it.

    • jwz says:

      The problem is not xmms: xmms has a Perl interface for remote control that works fine (for some value of "fine" approximating "doesn't crash too much".) The problem is the dumbass dsp_oddsock plugin. It launches automatically, but doesn't auto-connect to the server. I'm only using that plugin because the dumbass and unmaintained liveice_xmms plugin finally stopped working.

      All of the software that comes anywhere near xmms or icecast is pretty much cargo-cult quality (and that includes both xmms and icecast themselves, of course.) I'm amazed any of it works at all.

  6. rpkrajewski says:

    You have just reinvented Quickeys. I can't imagine how kludgey this must be in the face of all the X widget sets out there.

  7. wait.

    won't that break if you start the program in windowshade mode?