Slashdot Mirror


Open Source Macro Programs?

BlueCup asks: "I've wanted to switch to Linux for quite a while, but my work requires a lot of automated tasks. For these tasks I have global macros set up using Toolsworks and Macro Express. So far I've looked for equivalents for Linux, but have been unsuccessful. Does anyone know of a similar program that reaches the same level of complexity of the above programs for Linux?"

11 of 88 comments (clear)

  1. Then why do you want to switch to linux? by Lord+Bitman · · Score: 5, Informative

    I dont think anyone can fairly answer your question without some specifics about why you would want to switch to Linux. I mean, I'm guessing "I love the command-line!" isnt high on the list.
    This comment may never be seen, it depends on if it's seen first by the "He hates linux! Get him!" mods or the "He didnt jump to supporting various open-source projects, I have no idea what he's saying but it's probably insightful!" mods..

    If this is the kind of tool you are used to using, I dont think Linux is the right solution for your "automated tasks". I guess that's just my opinion, but people who are used to using "Macros" which act like a user instead of "Scripts" which do their best to get the job done and tend not to be friendly to programs which dont know about them, I don't think they're ready for linux.
    This isnt a "Linux isnt ready for them", thing, it just seems to me that Linux is a different way of thinking, seperate from these "Automating a task means having the computer repeat you" macro programs. (Yes, it's a simplification, but since the guy is talking about "Using these programs" instead of "programming in VBA", I'm guessing he's having the programs do most of the work for him)

    Explain what it is that attracts you to linux, and you're likely to get an answer which comes closer to what you really want.
    That said, check out "Expect" here

    --
    -- 'The' Lord and Master Bitman On High, Master Of All
  2. Shell? Perl? ;-) by PaulBu · · Score: 4, Informative

    Well, not exactly, but I think that you will find that many tools which evolved within UNIX culture (not necessarily only on Linux) have much higher degree of built-in scriptability.

    In addition to pretty (or not so pretty) GUIs, their designers felt obliged to incorporate an alternative text-based interface, not to mention that many useful packages started from being text-based and grew their GUI skins later on. In any case, most often everything that you can do with keyboard and mouse (and then some) can be done via some kind of command line.

    Gimp and OpenOffice.org are good examples of build-in scriptability, and, of course, EMACS Rulez!!! ;-)

    Of course if no single program can do everything that you need you can tie programs together either by generating scripts (in, e.g., Perl) and calling the progams from within a perl script, or using the built-in language of whatever main tool you are using and calling arbitrary scripts and programs using its system() facility.

    Hope this helps.

    Paul B.

  3. Learn a proper interpreted language by uradu · · Score: 4, Insightful

    These in-between macro systems have always struck me as eventually pretty rendundant and/or useless. At first most started as fairly simple GUI automation gadgets, sending window messages to this or that window, etc. Then they started adding some simple expression evaluation to make them a bit more robust, and eventually they ended up with a pretty much full-blown scripting language. Except that they are quite proprietary and still require a fairly steep learning curve. It begs the question why one wouldn't simply choose a general purpose interpreted language like Python that is truly cross-platform, is very expressive, and has very strong GUI bindings? I think the difference between learning the macro language of one of these proprietary thingies and learning something like Python is fairly minimal, and the advantage with learning Python is that you will know an established programming language that implements modern language concepts, not someone's idea of what a scripting subsystem needs.

  4. Re:is this a trick question? by RevAaron · · Score: 4, Interesting

    "macros" usually have to do with scripting GUI apps, yet another thing Linux mostly blows at, especially compared to AppleScript/OSA on Mac OS X but even Windows' WSH is better. There is KDE's and Qt's DCOP system, which is neat but very poorly supported.

    There are a lot of things you can't do with bash or perl. The unix mindset would be to simply rewrite the whole app that they want to automate's functionality all over again in bash, perl or C, and then control that app with perl/bash/whatever. But that is a royal pain in the ass.

    I don't think the poster would care if the particular macro package happened to be a perl module that added the ability to write automation macros for X apps, but if such a thing existed, it would be worth naming.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  5. bash by _aa_ · · Score: 4, Informative

    I get the impression that you want to record mouse movements and keystrokes and whatnot, but given that I don't know the specific tasks that you are trying to "macro" I think this method of automation is bass-ackwards.

    I can't think of very many tasks in linux that cannot be done with console based alternatives to graphical ones. That being the case, you can control and automate all aspects of a console application using bash or the shell of your choice.

    But if you must automate an application that only has a graphical interface, this application should do it.

  6. macros are scripts, and scripts are macros by chrisopherpace · · Score: 4, Informative

    In the Linux/UNIX world, we call "macros" scripts. They do automated tasks, just like macros do, and most of the time more efficient than their Windows counterparts. Expect is an excellent utility for creating "macros", in addition to the capabilities of Perl, etc, Expect allows you to redirect output and input better, in a more "friendly" way.

  7. actually, Gnome (and hence Linux) does it well by mike_sucks · · Score: 5, Informative

    Remote Control and Scripting of Gnome Applications with Python. It should also work for KDE and Java apps once they get their act together.

    It's here today, and it works. I was at the talk at LCA this year. Write a Python script, add a launcher for it on your panel/desktop, and away you go!

    -mike

    --
    -- "So, what's the deal with Auntie Gerschwitz et all?"
  8. The best macro program is... by Imperator · · Score: 5, Funny

    m4

    --

    Gates' Law: Every 18 months, the speed of software halves.
  9. Re:Great timing! by TheWanderingHermit · · Score: 4, Informative

    OOo has a macro recorder in 1.1.1 and later, so you can record a macro. If it includes opening files, you can edit the macro later and find a new way to specify files.

    Star BASIC (or OOo BASIC, if you prefer) is a powerful scripting language for OOo that lets you work with recorded macros, or writing your own macros. (At one point I was considering writing a full application in OOo BASIC and basing everything on OOO.) It is also possible to specify a macro on the command line, so you could make a script that would run OOo, start a macro, run the macro, then exit OOo.

    You can also automate OOo with Java (or Python, or C++).

    Scripting OOo to do conversions is VERY simple. there is someone on the OOo Users mailing list who has a website with samples for doing conversions (although I think most of his conversions are for Writer files, the idea would work on Impress files).

    If you really want ideas for scripting OOo, get on the mailing lists. There's a User mailing list, an API-DEV one that is good for anyone doing any programming of OOo, and a Scripting Framework one.

    Hope this helps you find a way to automate what you're doing.

  10. Perl. by jonadab · · Score: 5, Informative

    Perl isn't called a "glue language" for no reason. You can stick *anything*
    together with it. Need to process an image using Gimp's filters, resize it,
    and insert it into an OpenOffice document? No problem, Perl can do that.
    (You need the Gimp/Perl bindings, which most distros make a separate package
    from the Gimp itself, but installing them easy. If you want the script to
    be portable at all, you also want Archive::Zip. If portability doesn't
    matter you can backtick out to the info-zip version of zip instead.) Need to
    automatically retrieve a webpage, fill out and submit a series of forms, parse
    the resulting page, extract some data, and insert that into the document too?
    No problem. (You want WWW::Mechanize and HTML::Tree.) I could go on, but you
    get the idea. When it comes to automating common repetitive tasks, Perl is
    awesome, and the modules on the CPAN have most of the work already done.

    If all you want is to press a key on the keyboard and have a series of key
    strokes punched in, get yourself a macro-equipped keyboard. (Avant makes the
    top-of-the-line ones, but there are cheaper ones out there too.) But if you
    want to make things happen automatically while you sleep, read slashdot, and
    do other unproductive things, learn Perl. Also learn to use cron.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  11. Applescript!! by moosesocks · · Score: 4, Interesting

    One of Apple's best kept secrets is (and always has been) the astonishing power of AppleScript.

    By adding a few simple functions and classes to your program (read: there's no reason for a developer NOT to implement applescript in their program), all programs can talk with each other, control one another, etc. through a common, scriptable interface.

    This interface is applescript. It's a natural-language scripting language (almost as easy to learn as BASIC).

    The concept is simple, each program has a 'library' of functions the program can provide to the user or other functions, as well as controls which are input-only (ie. an interface for skipping to the next song in iTunes). Any program can access these functions, and pass them to other programs through a ridiculously easy language.

    I've always wished that a similar interface would exist between platforms, and even over a network. Imagine how great it would be if we could transparently tell our computer at home to stream us some music at our office (sorry I can't think of a better example...).

    Actually, I believe the original GNOME project aimed to do something very similar to what I described above, however, it failed it's key original goal primarily as a result of hasty development to compete with KDE. And it was a real pity, as GNOME had so much more potential than KDE based upon the original goals of the project.

    --
    -- If you try to fail and succeed, which have you done? - Uli's moose