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?"

88 comments

  1. Bash by Anonymous Coward · · Score: 0

    I found thin new think I think that they call it BASH ;)

    1. Re:bash by davedoom · · Score: 1
      I am responding to this post and not the quoted one below because it captures the arrogence of the development community. I swim in a sea of web interfaces that use java script popups, flash controlled buttons, java applets and god only knows what that are required to do my job.
      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.
      This was the case about 5 or 6 years ago, but that trend has been abandoned. MOST of the tools that I am encountering today have no scripting API. The mozilla group has no interest in making the the browser accessable to text tools (I asked), and the makers or all these new point-n-click interfaces don't have a clue what I am talking about.
      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.

      I have just completed writing a script using android to setup ~300 domains on an anti-spam system that uses javascript popups and once again is REQUIRED by my job. If I can paraphrase the above "boy you sure are stupid for wanting to automate your point-and-click job. Why don't you badger the developers of the GUI to make it easier for you to write expect scripts?" can you imagine what this must sound like to the people considering moving to linux (what in my opinion are the most likely to move, the most "tech") , or to the developers themselves faced with armies of secretaries who can barely figure out a web page?
      Android itself is a pretty putrid piece of work that will not accomodate window moves or resizes, but it is still better that the recommended gerd app that can only accomodate GTK programs.
    2. Re:bash by _aa_ · · Score: 2, Informative

      I resent your paraphrase. Because of this I am not compelled to help you, but I will anyway because I am arrogAnt. If I were in your situation, I would write a perl script that uses this module (hey look it that! it's written by the mozilla people!) to automate your javascript interface tasks.

      But as long as your method is working, by all means, keep using it.

  2. Great timing! by heldlikesound · · Score: 2, Interesting

    I'm glad this question was asked, as I am trying to do something that would greatly benefit from a macro...

    Converting PowerPoint presentations from PPT to SWF is something that OpenOffice seems to do very well. The research group that I am involved with at BGSU has developed a video-conferencing tool in Flash. We'd like to embed PPT's into the video conferences, but as of now we have to convert each frame by hand, then make the SWF in flash, a very tedious process...

    Any ideas on how to script Open Office to convert PPTs to SWF's?

    --


    Cloud City Digital: DVD Production at its cheapest/finest
    1. 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.

    2. Re:Great timing! by Anonymous Coward · · Score: 0

      OOoooo. Neat!

  3. is this a trick question? by gl4ss · · Score: 0, Flamebait

    ever heard of "scripting"? with bash, perl or whatever? aren't the "macros" a pale shadow of scripting anyways???

    is there a compo to get these things submitted to slashdot or what?

    -

    in open source world mixing different languages works out too nicely usually...

    --
    world was created 5 seconds before this post as it is.
    1. Re:is this a trick question? by gl4ss · · Score: 2, Insightful

      ah silly me. he wanted powerful configurable hot buttons(call them what you want)..

      .

      --
      world was created 5 seconds before this post as it is.
    2. 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
    3. Re:is this a trick question? by endx7 · · Score: 1

      ever heard of "scripting"? with bash, perl or whatever? aren't the "macros" a pale shadow of scripting anyways???

      Hey, I was going to suggest a C pre-processor, but I guess in the windows world macro == script

    4. Re:is this a trick question? by whois · · Score: 1

      The UNIX mindset isn't to rewrite the whole app, it's for the app to privide a healthy backend so scripting against it is possible.

      Think of programs like kazaa. Say you have a home network and five users who all connect and use kazaa. Wouldn't it be nice if you could connect to your kazaa session from any machine? Or allow all users to use one kazaa "daemon" and run a seperate client to search for and download files?

      So in UNIX you write a server that runs as a daemon on one host, then you connect to it to check download status or queue files. The nice thing about this is, you're not limited to one client. You can use a graphical client when you want, or if you need to *script* something you can write a bash, perl, or other script to handle your scripted event. Say, automatically searching for Britney Spears pictures once a day, and downloading any new ones you don't have.

      So, lets talk about how to do this with Office.

      MS Office is a horribly shitty program, and the main reason for that is the document format is closed.

      Personally, I used to have to submit weekly reports each week, in word format. Usually this was just a bunch of text that needed to have a pretty header and footer attached to it.

      What I would've loved to do is keep a list of things I'd done that week in a text file on my harddrive, then have a cron job that ran a perl script to convert the incoming text into a word document, then email it to my boss.

      Well, with OpenOffice you can do that.

      You can also autogenerate spreadsheets if you want.

      OpenOffice apparently supports Macro's too, if you like loading bloated applications to do simple tasks.

      I've personally never needed to write a screen-scraping script on a GUI app for UNIX, mainly because most of them were designed with these things in mind.

    5. Re:is this a trick question? by ajagci · · Score: 1

      "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.

      OK, so you are a Mac geek and Linux doesn't work like you are used to. Fine. I have tried AppleScript/OSA and I happen to think that it sucks: it's a lousy language, it's tedious to use, and it doesn't work quite like I expect it either.

      You know, that's why we have different platforms. If the Mac works the way you like it, use it and stop whining and complaining about Linux.

      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.

      If the poster doesn't want to learn the Linux way of doing things, the poster should stick with Windows. It's that simple. Turning Linux into Windows isn't going to be good enough for him, and it's going to annoy the hell out of people like me who actually prefer the way Linux works right now.

    6. Re:is this a trick question? by Curtman · · Score: 1
      Wouldn't it be nice if you could connect to your kazaa session from any machine? Or allow all users to use one kazaa "daemon" and run a seperate client to search for and download files?

      Thats what we call mldonkey. :P

      • MLdonkey runs as a daemon on the computer. It can be controlled using several interfaces: the simplest one is telnet (telnet 127.0.0.1 4000), a more interesting one is a WEB server (http://127.0.0.1:4080/), and a binary protocol allows access using more elaborate Graphical Interfaces (see the GUIs available on your system at the bottom of the page). MLdonkey comes by default with a GTK interface. All these interfaces can be used locally, or remotely (after disabling security restrictions).
    7. Re:is this a trick question? by Anonymous Coward · · Score: 0

      Tell me about it..

      "I've wanted to switch to Linux for quite a while, but my work requires a lot of automated tasks."

      The only answer to this is "BUT?!?!?! Sweet Jebus man, what the hell is stopping you?!?!?"

    8. Re:is this a trick question? by shyster · · Score: 1
      Personally, I used to have to submit weekly reports each week, in word format. Usually this was just a bunch of text that needed to have a pretty header and footer attached to it. What I would've loved to do is keep a list of things I'd done that week in a text file on my harddrive, then have a cron job that ran a perl script to convert the incoming text into a word document, then email it to my boss.

      WSH and Office's VBA implementations can easily handle this. The way I usually handle this sort of thing is to write the data in plain text (or CSV for Excel) and then use VBA code to format it and make it pretty. I've done just this sort of thing with both Word and Excel using VBScript on an ASP page. I've gotten out of scripting lately, but .NET may make it even easier to do this sort of thing.

      You could even have Outlook email it for you, though it'd probably complain that something was trying to send email on your behalf. That could be solved with Push The Freakin' Button, or by doing a direct SMTP connection to your mail server.

      If your VBScript isn't up to par, then AutoIt is a decent macro program that couldn't also do what you want, but it wouldn't be as reliable or robust...plus it can't do it in the background. I have had to use it for progams that had no scripting interface though, and was thankful that it existed.

    9. Re:is this a trick question? by Black+Perl · · Score: 1

      "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.

      Actually, I see it the other way... sutomating GUI apps via macros is a kludge that is necessary when the apps don't have a powerful command-line interface... which most Linux apps have.

      --
      bp
    10. Re:is this a trick question? by chthon · · Score: 1

      That's just the MS way. In MS make (nmake) variables are also called macro's.

      Jurgen

    11. Re:is this a trick question? by RevAaron · · Score: 1

      I agree, that is, I would much rather have my GUI apps have the ability to be scripted in earnest rather than simply automated with events- clicking on buttons and the like.

      But, no matter how many times you say it, it's not true. Without writing additional C code (or compiling someone elses) how can I ask my window manager what windows are open, and then perhaps switch to the one I want? Or, how do I ask my email client for a list of names in my addressbook? The sad thing is that most Linux and *nix apps don't support these features in any standard way. Sure, I could write *new* code that parses the addressbook format, or a new C-module for my window manager that will spit out a list of the windows and add some ability for me to tell it which one I want brought to the foreground... But that is a pain in the ass compared to a some sort of consistent scripting system.

      Again, as I mentioned, KDE's DCOP or Qt's QCOP is a step in the right direction. But support is pretty spotty in KDE and Qt apps, and completely lacking in non KDE/Qt apps.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    12. Re:is this a trick question? by cant_get_a_good_nick · · Score: 1

      Actually, I see it the other way... sutomating GUI apps via macros is a kludge that is necessary when the apps don't have a powerful command-line interface... which most Linux apps have.

      I disagree, at least I don't think that's a universal answer. Macro languages allow you to make automated decisions based on current program state. Command line interfaces only allow control based on initial program state. Sometimes you don't care about the distinction, but it's still a very powerful difference. Macro languages aren't necessarily tied to GUIs either, just are more necessary because there's generally no other way to automate them.

      Nice sig BTW. I'm reminded about the /. recent story where some firmware blew acted weird because they couldn't recognize Feb 29 as a leap-day.

  4. WSH by JMZero · · Score: 1

    Windows Scripting Host should provide all the functionality you need. It's fairly easy to use, even if the target program has a complicated UI.

    I've done this sort of batch convert with it before without much hassle.

    --
    Let's not stir that bag of worms...
    1. Re:WSH by RevAaron · · Score: 1

      But support for WSH can be *very* spotty. I imagine PowerPoint supports it pretty well, no idea about Flash, though.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    2. Re:WSH by cant_get_a_good_nick · · Score: 1

      You mean there is a use for WSH besides sending out macro viruses? This should be front page news!!!

  5. command line? what apps? by Tom7 · · Score: 2, Interesting

    The command line tools are great for "macros" (scripting). Truthfully, I don't really know any graphical programs on linux that I'd want to script. So, emacs works great for me there---but I guess I deal mostly with text.

    1. Re:command line? what apps? by Anonymous Coward · · Score: 1, Informative

      The Gimp.

      800+ photos, from several family reunions, that my dad had scanned at various large resolutions and cleaned up by hand. Now all the same size, with a consistent naming strategy and overall brightness/contrast within tolerable limits. Collated together into an HTML-based slideshow with thumbnails, and mid- & large-sized zooms. Manual and auto-play versions. Everyone goes home with a CD of it this summer.

      Thank you Perl.

    2. Re:command line? what apps? by Anonymous Coward · · Score: 0

      photoshop built in, VERY EZ 2 USE macro interface inside a work pallette. i know, gimp is free-er but come on . .. . . . you can't consider yourself a graphics professional on the GIMP for too long

    3. Re:command line? what apps? by Anonymous Coward · · Score: 0

      Come on....if you work in graphics you can't consider yourself a professional for too long.

  6. 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
    1. Re:Then why do you want to switch to linux? by Anonymous Coward · · Score: 0

      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..

      God damn - karma whoring sure is hard work these days isn't it? But I guess you have to stand out from the rest of the "go ahead and mod me down" comments.

    2. Re:Then why do you want to switch to linux? by Lord+Bitman · · Score: 1

      just an experiment, actually. I'd love to do a controlled experiment sometime.. I theorize that any post, sufficiently padded with bullshit about modding, will hit 5 :)

      --
      -- 'The' Lord and Master Bitman On High, Master Of All
  7. OpenOffice with embedded Python? by JustinXB · · Score: 0

    Has anyone thought about adding embedded Python to OpenOffice for macro usage? If you consider what else Python can do, HTTP requests for example, you could really extend OpenOffice's documents.

    1. Re:OpenOffice with embedded Python? by Anonymous Coward · · Score: 0

      Yeah, because VBA has worked out so well for Windows...

  8. 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.

    1. Re:Shell? Perl? ;-) by JabberWokky · · Score: 3, Informative
      All KDE apps are scriptable via dcop, and dcop can be tied to keystrokes (including very complicated combo strokes or mouse gesutures) in the KDE Control Center. You can also tie generic actions to the app with focus (i.e., a mouse gesture saves, no matter what app is active or what the "save document" function is called in dcop).

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    2. Re:Shell? Perl? ;-) by JabberWokky · · Score: 3, Informative
      Oops. I meant to write "All KDE apps are scriptable via shell scripts through dcop, and...". You can script dcop through bash, python, perl and of course most compiled langauges. Plus anything that has an exec or system call.

      --
      Evan

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    3. Re:Shell? Perl? ;-) by PaulBu · · Score: 1

      Yes, but I was making more of a design philosophy point rather than technical point (though I understand that the original question was technical in nature and your answer might be more appropriate! ;-) ).

      Paul B.

  9. The world will be saved by $scripting_language! by dacarr · · Score: 1, Informative
    Find a scripting language. Learn it. Have fun.

    For what it's worth, I like bash and am learning perl, but many prefer python as well.

    --
    This sig no verb.
    1. Re:The world will be saved by $scripting_language! by Vaevictis666 · · Score: 1

      Actually, what really scares me is that I've been finding myself (as a Web developer) doing batch file processing with an interactive PHP session. 6-8 lines of php and I can do all sorts of neat and nifty things - doubly so with shell_exec (or the `backtick` operator - same functionality) if I need to do a move or rename or whatnot. I'm finding that much easier than raw shell stuff with foreach i (`ls`) if only because I'm so much more comfortable with php.

    2. Re:The world will be saved by $scripting_language! by DShard · · Score: 1

      I can understand the desire to use whatever you know best for programming to the exclusion of others. Whenever you have a hammer everything starts looking like nails. But you need to know what your goal is. Perl is great at being the glue between anything, but sucks for maintainability(god knows I love regex but try explaining it to a coworker) PHP is great at web apps but blows on a command line. Python seems to fit the bill for being understandable but the performance is up there with quickbasic. Java, well I hate it, but feel free to tell me why it's the next best thing to sliced bread(I still have to learn it anyway, and it still sucks compared to c/c++)

      You need to figure out who is going to keep this and what are you targeting when you pick the language. Otherwise your likely to pick wrong.

    3. Re:The world will be saved by $scripting_language! by Vaevictis666 · · Score: 1
      You need to figure out who is going to keep this and what are you targeting when you pick the language. Otherwise your likely to pick wrong.

      Exactly so. In this case, I'm looking to write a one-off just to do something in batch - do I care about runtime efficiency? No. Maintainability? Heck it's not even hitting a file. All I'm looking for is something that works, and works how I expect, hopefully the first time. In that case, there is no wrong pick.

  10. 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.

  11. KDE 3.2 by pcbob · · Score: 3, Informative

    New KDE contains some pretty nifty hot-key action editor (in control center), take a look, you might find it's what you are looking for.

  12. 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.

  13. 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.

    1. Re:macros are scripts, and scripts are macros by (mandos) · · Score: 1

      Through extensive use of Macro Express (and Keyboard Express) at work, I think what the writer may be interested in, is more scripting GUI commands with some logic and text processing built in. Shell scripts and languages like Perl are great, but don't suit all needs. I personally had been thinking about reimplementing ME under GTK/QT but haven't decided if it would be worth the time/effort.

      I haven't had time to explore your sugestion of Expect yet, as I'm still at work, but it suggests combining it with TK; so maybe a good ME replacement is already ready.

      My question is that of Apple Script. From the little I've heard, it seems to basically have the same functionality of ME but is built into the Apple OS. Has anyone tried implementing Apple Script in other enviroments? It could make a good, free rapid prototyping enviroment that is cross platform. I know it is "dumbed down" from "real languages", but oftentimes speed is more important then extensibility in a prototyping enviroment. I've used ME (which has a lot of problems) to solve problems in minutes, that otherwise would have been solved manually in hours or days by my coworkers.

      Mike Scanlon

    2. Re:macros are scripts, and scripts are macros by BlueCup · · Score: 1

      Exactly! Efficiency is the key in making a script that may only be ran a hundred times.

      --
      WANNAWIKI Wannawiki WannaWiki WANNAWIKI!
  14. 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?"
    1. Re:actually, Gnome (and hence Linux) does it well by BlueCup · · Score: 2

      Hey, thanks =D just what I was looking for.

      --
      WANNAWIKI Wannawiki WannaWiki WANNAWIKI!
    2. Re:actually, Gnome (and hence Linux) does it well by mike_sucks · · Score: 0

      NP! :)

      --
      -- "So, what's the deal with Auntie Gerschwitz et all?"
    3. Re:actually, Gnome (and hence Linux) does it well by TheWanderingHermit · · Score: 1

      How about other languages? I can't get a handle on Python (Maybe it's me, but I have a hard time seeing whitespace as something that effects how a program runs...)

    4. Re:actually, Gnome (and hence Linux) does it well by mike_sucks · · Score: 1

      Sure.

      The Gnome implementation of the Accessibility Toolkit uses Bonobo, so as long as your favourite language has Gnome bindings which supports Bonobo, you're set.

      -mike

      --
      -- "So, what's the deal with Auntie Gerschwitz et all?"
  15. Those programs are band-aids by Anonymous Coward · · Score: 1, Insightful

    If you can work with all your tasks and files and data on the command line, then you can just put your commands in a batch file. This was common under DOS. That is why the DOS people you talk to who really get things done are so into their ancient collections of small command line utilities, and usually don't use big monolithic programs that are supposed to have everything available from menus. Even in the DOS days the keyboard and mouse macro utilities were becoming popular because not everyone had a complete enough collection of those simple utilities.

    When you use a mouse-and-menu interface, you are using the computer at a pre-language level. You are like a caveman who can't say "move the dead deer next to the fire" and instead you point and say "Ugh . . . duh!". This is fine if you are dealing with one task, but if you want to teach your cave child that deer should be put next to fire to cook it, you need language.

    When you use graphical macro packages, you are like a caveman trying to make up for having no language by using a video camera and VCR. You video tape yourself saying "Ugh . . . duh!" one time and press rewind whenever you bring home another deer.

    This is not to say you should try to be some console-only using elite unix jerk off. The graphical interface with it's multiple windows and desktops is a good way to keep track of the way people work on lots of things at once, from interruption to interruption and missed deadline to emergency. You can take the complecated tasks you script, and easily associate those commands with an icon on your desktop. But if you always run one icon and then run another, don't script the pre-linguistic pointing, take the underlying commands that those icons run, and put them in a new script, and make an icon for that.

    The popularity of mouse-macro packages in Windows and Macintosh merely reflects that many of the people doing fairly complecated tasks on those systems don't know how to "talk" to their computers, they just know how to grunt and point. They'd rather pay for a new software package to help them grunt and point at collections of grunts and points rather than learn language.

    So pick something reasonable and learn to work with language and collect your commands into scripts. The three obvious choices -- bash, perl, and elisp -- are all available on Windows, so you can be assured that your new skills will also be useful there.

  16. The best macro program is... by Imperator · · Score: 5, Funny

    m4

    --

    Gates' Law: Every 18 months, the speed of software halves.
    1. Re:The best macro program is... by fiori · · Score: 3, Funny

      Excuse me, I almost swallowed my tongue while reading this comment.

    2. Re:The best macro program is... by Imperator · · Score: 1

      The funny thing is my post was modded by at least one person as "informative". Unless the tasks you're fond of automating on Windows involve autoconf...

      --

      Gates' Law: Every 18 months, the speed of software halves.
    3. Re:The best macro program is... by Anonymous Coward · · Score: 0

      I was about to say, either m4 or the C preprocessor. :-)

  17. Re:Todays quote? by Frizzle+Fry · · Score: 0, Offtopic

    It makes sense to me. What's your problem with it?

    --
    I'd rather be lucky than good.
  18. Tcl, REXX, AppleScript by clem.dickey · · Score: 2, Insightful

    There are any number of scripting languages which work well at the top level. Fewer work well as an "embedded" language. Three which fall into that category are Tcl, REXX and AppleScript. (Someone else mentioned DCOP.) Of those, Tcl is libre. There's probably a libre version of REXX floating around somewhere, but it doesn't matter too much. I would pick Tcl. Take a look at how DFS and Expect have embedded Tcl. Expect can also use Perl, but Perl isn't quite as seamless in that space.

    AppleScript, although not free, is interesting for two reasons. (1) It uses Open Scripting Architecture, which separates the language syntax from the execution engine. (2) It has been used from the start for scripting GUI-like interactions, which is the kind of "macro" language which the original poster had in mind.

  19. Re:Todays quote? by Anonymous Coward · · Score: 0

    Actually it makes sense if you realize the word 'means' here is used in the sense of, 'Living beyond your means.' In other words, Money.

  20. 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.
    1. Re:Perl. by BlueCup · · Score: 1

      Thanks =) I think that answer provided the level of detail I was looking for.

      --
      WANNAWIKI Wannawiki WannaWiki WANNAWIKI!
    2. Re:Perl. by Rob+Riggs · · Score: 1
      Perl isn't called a "glue language" for no reason.

      He's right. You don't want to get any of that on your fingers. ;-)

      Perl is perfectly suited for those applications where no one else will ever have to maintain the code. This certainly sounds like one of those cases. If, on the other hand, you expect others will need to maintain it, you might be better off using a more maintainable language, such as Python. Similar features, more legible.

      Oh, and if this will require learning a new language for you, you'll be more productive in less time with Python.

      Is this funny, insightful or flamebait -- you be the judge.

      --
      the growth in cynicism and rebellion has not been without cause
    3. Re:Perl. by jonadab · · Score: 2, Interesting

      > Is this funny, insightful or flamebait -- you be the judge.

      Yes, yes it is.

      Python is for a different sort of mindset than Perl, a mindset that is less
      comfortable with having multiple different ways to accomplish the same thing,
      more comfortable with having one obvious way to do things, a mindset that
      prefers objectual programming over contextual or functional programming, a
      mindset that doesn't think significant whitespace is evil. If you find that
      you don't like Perl, then you should give Python a try, as you might like that.
      (Conversely, if you find that you don't like Python, you should try Perl.
      They're really quite different in style.) The languages are both VHLLs, and
      so they're both suitable for modern programming (as opposed to, say, C, which
      is not, unless you're doing some inherently low-level stuff that *requires*
      micromanaging resources, such as device drivers, bootloaders, kernels, &c).

      I recommended Perl not because Python is bad, but because Perl is what I
      use and what I know. (I tried Python briefly, but it didn't really take for
      me. I don't like its typing system. That's just a personal preference.) I
      don't wince when people start new projects in Python, like I do when they
      start new projects in C.

      --
      Cut that out, or I will ship you to Norilsk in a box.
  21. bash/python + command line options by mercuryresearch · · Score: 3, Informative

    My business is utterly dependent on automation.

    Several years ago I had been using Visual Basic and a lot of very ugly hacks (for example, one task we had required drawing a diagram from a database -- the VB app used the dangerous SENDKEYS function to activate and send simulated keystrokes to coreldraw to perform the drawing. Similar kludges existed for making CDs, etc.)

    The problem I had with Windows/VB was there was so little command line support by common windows applications. With Linux it's actually been the opposite -- you're far more likely to be able to get the job done on the command line than by somehow communicating with the GUI. Most applications -- be it burning CDs, printing files of a particular format, processing databases, etc -- are controlled by command line unless you absolutely need full GUI to get the job done.

    I've found a combination of bash shell scripts and Python code can do pretty much anything I can imagine. Some things that were virtually impossible in the windows environment can be done very easily under linux due to the great command line support for most applications. Also, since file formats are open, it's possible to do things like generate XML under Python that is a formated spreadsheet readable by Gnumeric -- something you just could not do in the Windows environment without essentially running Excel by remote control to build things cell-by-cell.

    The big plus was the scripting code was far simpler, much shorter, and since it didn't depend on wierd hacks like sendkeys, more reliable. (I still use Windows and VB, but now it's just all nice, in-application scripts rather than trying to integrate everything.)

    I will say that scripting a GUI apps is a bit harder than VB on windows, primarily because the VB-Office integration is much better. But I'm more than happy to trade a few pretty buttons for "dothistask -a -b -c" on the command line.

    1. Re:bash/python + command line options by Dr.+Evil · · Score: 3, Informative

      You can get a lot done in Windows with VBA and calling on routines using OLE. It's evil evil stuff, but it works and doesn't take the brute-force sendkeys kind of route... that stuff is a hack.

      Check out what the sick Perl bastards have been up to : http://www.xav.com/perl/faq/Windows/ActivePerl-Win faq12.html#use_ole

      I've always had trouble finding good docs on this stuff when I try to take advantage of it.

  22. 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
    1. Re:Applescript!! by spinspin · · Score: 1

      AppleScript can currently be done over IP. It's not exactly seamless, but it can be done. That's half of 'cross platform and over a network'.

    2. Re:Applescript!! by cant_get_a_good_nick · · Score: 1

      Minor quibble... Apple Events are the things that controlled your program. AppleScript is just a language binding (I believe there are others now). But I always loved AppleScript/Apple Events. Very cool tech ahead of it's time. True AppleEvent capable programs actually had a detachment between the menu/GUI interface and the underlying code. The GUI code just sent AppleEvents for every GUI action. The advantage to this? Now your app was recordable, you could record every action you took in your porgram, then automate it (essentially short circuiting the GUI part and just doing it programmatically).

      Not to start a flamewar, but I don't know why there are such a bunch of people who believe the command line is the UI that gives ultimate control (I won't go into usability issues) and dismiss macro programs. Command Line interfaces only allow control at app startup, whereas macros that can control deep event models (like AppleEvents/AppleScript) can control program state over the life of the app. Very powerful.

      KDE is trying to bring some of this with DCOP. It still seems pretty immature, but looks cool.

    3. Re:Applescript!! by jbrownc1 · · Score: 1

      Should work like a champ on Linux.

    4. Re:Applescript!! by nicolas.e · · Score: 1

      Command Line interfaces only allow control at app startup, whereas macros that can control deep event models (like AppleEvents/AppleScript) can control program state over the life of the app. Very powerful.

      Well, the mac or unix ways are quite different, as I understand (never used Macos). If I understand well, in macos, for example, applescript will start the program, fill some cells, print the spreadsheet, and close the program.

      In Unix, I would create a script (shell, perl whatever) putting together many small programs (sed, awk, seq, lp...) and have the action done as efficiently and as powerfully as on Macos.

      So I think that there is no better way, just different ones.

  23. Try Wine by satanami69 · · Score: 1

    If you want, try to see if your current applications run under WINE.

    I use a program called "Perfect Keyboard", which is a mouse and keyboard macro recorder/playback. It's great for leveling in MMPORGs. I have a spare Computer running a continious loop to /SELECT NEAREST TARGET/ /FOLLOW TARGET/ /ATTACK/ /WAIT TEN SECONDS/ /LOOP/. I can gain 1-2 levels per night by doing nothing but killing rats. It's runs Windows 95 too, so it should run fine under wine.

    --
    I really hate Dan Patrick.
  24. KDE as well, using DCOP by Anonymous Coward · · Score: 1, Informative

    KDE applications use DCOP to script applications. You can access it from various languages, including shell scripts using the dcop command-line application.

    1. Re:KDE as well, using DCOP by RevAaron · · Score: 1

      Note that I mentioned DCOP. I didn't provide a link though, which is easily found with Google. But as I had mentioned, support is spotty with DCOP and the Qt-only QCOP.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  25. Kommander for KDE by Anonymous Coward · · Score: 0

    KDE's Kommander lets you construct simple scripts and dialog-based applications to run shell commands and control other KDE applications through DCOP.

  26. xnee by Zurd3 · · Score: 2, Interesting

    After hours of searching for macros I can say this is something missing in linux, yes the command line is very efficient but sometimes you do want to automate things that cannot be done with a command line.

    I found xnee which is an X macro recorder/player, use both keyboard and the mouse. It isn't perfect, but with some tweakings it can do a lot of stuff. As far as I know, I'm still waiting for their GUI so for now you'll have to use it on the command line only.

    One advice, if you use xnee, don't change your widgets or fonts, if you record a macro to press a button and you change the way this button is displayed, for example it is smaller, then xnee won't be able to click on it.

  27. xbindkeys + scripts by 0x0d0a · · Score: 2, Informative

    Write a script in bash or perl -- it can do *anything*.

    Then have xbindkeys, a simple program that runs commands when you tap specified key combinations, set up to trigger it.

    Many window operations can be performed from the keyboard in powerful window managers like sawfish.

    Making your environment dance at the touch of a key is what Linux does best.

  28. I have a similar problem. by Anonymous Coward · · Score: 0, Funny

    I've wanted to switch to Macintosh for quite a while, but my work requires a lot of GUI-intensive tasks. For these tasks I use my mouse to click on links in Internet Explorer. So far I've looked for equivalents for Macintosh, but have been unsuccessful. Does anyone know if the Macintosh will support a GUI?

    *sigh*

  29. Welcome to Linux! Now, GO AWAY! by no_such_user · · Score: 1
    (Amongst) The problem(s) with linux GUIs is that they require the user to need a in-depth knowledge of how the system works. Hasn't this always been the case? So while the answer to a windows programmer looking to switch might be "learn how to script", this is simply not an option for the vast majority of computer users who were attracted to the "plug and play" mantra. And maybe that's why OS X (*shudder*) is quite dangerous to the linux community. It's a good thing Steve Jobs and Co. are arrogant asses, otherwise OS X86 would wreak havoc on linux... power of unix under a *user-friendly* GUI, sitting on cheap hardware. And I'd guess there are macro recorders for OS X, right?

    Do I have an answer? Sorry, no. I'm a big fan of scripting, but it's totally impractical when I think of how fast it is to record and replay macros.

  30. Asking the wrong question by jmorris42 · · Score: 2, Informative

    Asking for a "Macro language" on a UNIXlike system is like asking for an automatic transmission on a sportscar. They just don't belong together.

    In UNIX we have programs that do stuff. Then we have programs that implement graphical user interfaces to those programs. We don't write "macros" to click widgets in an automated way, we write new programs (often in easy to use scripting languages) that automate those underlying programs that do useful stuff to create new things. And if needed we then write new graphical interfaces to these new programs.

    Yes, because of the infection from migrating Windows/Mac programmers and programs we now have some exceptions to those rules, like OOo and Mozilla; but they are exceptions. And there are plenty of toolkit web browsing programs (wget, lynx, links, assorted Perl modules, etc.) and OO.o is rapidly being assimilated into the UNIX Way and becoming scriptable for truly useful work.

    --
    Democrat delenda est
    1. Re:Asking the wrong question by cant_get_a_good_nick · · Score: 3, Interesting

      Not to start a flamewar, but I think this is a bad answer. You're saying that "UNIX is like this" when really what it is "Linux is like this now". Typically, UNIX has been by and for geeks, which explains it's heavy weighting towards command line solutions. That's not the way it has to be, MacOS X has changed what UNIX has to be.

      Macro languages an infection? You're actually giving away a lot of power. Macro programs aren't just for n00bz. True macro languages also have conditionals. This allows smart control over the programs state at all times, whereas command line interfaces only allow it at program startup. You're giving away a lot of control, but it seems saying it's bad to have that control because some people find that control easier. Apple got it right with Apple Events in System 7 in later. You got a framework for consistent representation of program state and actions. AppleScript was the first programming language, but now other langauges have bindings, and I believe AppleScript has fallen out of favor for MacOS X.

      A better answer would have been: macro languages in general are only useful when the applications export their functionality in a consistent manner that can be easily used. It's easy for programs to hook into Windows event loops or access Apple Events because of their API consistency. UNIX/Linux just doesn't have that tradition, though it's improving with KDE/Qt with DCOP and multiple languages with DCOP bindings. GNOME probably has this too, but I don't know much about it.

      Hmm, that last paragraph was too technical. Maybe, more simply: "Linux doesn't have the required amount of consistency yet, but as soon as geeks realize it's cool to be able to have macros that control multiple programs, we'll have the hooks written in a week. =)"

    2. Re:Asking the wrong question by Baumi · · Score: 1

      I believe AppleScript has fallen out of favor for MacOS X

      I don't think so. While the original intentions of haveing different AppleScript dialects for different (human) languages are gone, AppleScript is still undergoing active development - with 10.2 (I think) it even gained the capability to script the GUI, which makes it possible to control even otherwise non-scriptable applications. Plus you can mix and match AppleScript code with that of any other scripting language (using the CLI AppleScript interpreter).

      So, to sum it up: AppleScript did get some competition on OS X, but I don't see it being phased out any time soon.

      Baumi

  31. Re:Welcome to Linux! Now, GO AWAY! by spinspin · · Score: 1

    > And I'd guess there are macro recorders for OS X, right? Apple has been pushing AppleScript in a big way, altough the recording aspect of it has been busted (in my opinion) since the dawn of OS X.

  32. Re:Todays quote? by cant_get_a_good_nick · · Score: 1

    The grass is always greener... Or more basically, humans are never satisfied.

  33. Platform compatibility? by tepples · · Score: 1

    With the Adobe solution, I would need to buy a copy of not only Photoshop Elements but also VMware and Windows. Or does CrossOver Office run the latest version of PS Elements?

  34. Perhaps band-aids are all that's needed by glpierce · · Score: 1

    What makes you think most people have the time, energy, or desire to learn to work with computer language? If you're a programmer or CS person, it makes sense, but it would be horribly inefficient for the typical person to do so. The amount of knowledge necessary to even approach coding of any kind vastly exceeds the payoff for almost everyone outside of the computer industry. We're not pointing and grunting here, we're mechanizing a task. Rather than repeatedly perform the same actions, we're creating machines to do our menial labor for us. That's advanced, not primitive.

    --
    G