Thread: C code for automation

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    3

    C code for automation

    I'm trying to find a C library for automating mouse clicks and keystrokes, something like the Python package AutoPy would be ideal. Does anyone know whether something like this exists?

    Some of you might have heard of Auto-it (http://www.autoitscript.com/site/autoit/), which automates GUIs in Windows. Something like that would also be good, but my main OS is Linux.

    I'm not sure whether it would be possible to create a shared library from the C source code in autopy. Any suggestions gratefully received!
    Last edited by Jacobite; 01-22-2013 at 03:03 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Did you even read the first link you posted?
    AutoPy
    A simple, cross-platform GUI automation toolkit for Python.
    I've highlighted the keywords for you.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    3
    Hi Salem, yes I know Autopy is cross-platform.

    I only mentioned Auto-it because "automation" could mean a lot of things, but Auto-it is another example of what I'm looking for. Not sure why you chose to emphasise the cross-platform aspect in your post. Maybe I should have posted in the Linux section.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    I've no idea what you're looking for.

    AutoPy is written in C, and you're just not saying what X does that Y doesn't.

    To answer your initial query, yes, you'll be able to create a shared library out of the AutoPy source code.

    In principle, the only thing you need to do is omit the main() function, then you can compile the rest as a library.
    You then compile the main(), and link with the library you created, and you're back where you started.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Jan 2013
    Posts
    3
    AutoPy is written in C, and you're just not saying what X does that Y doesn't.
    Yes, sorry. Ok, I'm actually a complete C noob (although I've just started learning it) but want to call C code from another language (Platform-Specific Issues for Euphoria - scroll down to section 5: "interfacing with C code").

    To answer your initial query, yes, you'll be able to create a shared library out of the AutoPy source code.
    Great! and thanks. That's all I really wanted to know. At this point in time, I probably don't know enough C to get this to work, since at the very least, I'll need to identify C types in the source files in order to use the correct "wrapping" code in Euphoria, and I think there is some Python specific code there which obviously I won't be needing, but at least I know now that it can be done. If I get stuck or have problems I'll be back.

    Thanks again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux Automation project.
    By John Erlandsson in forum Linux Programming
    Replies: 12
    Last Post: 09-09-2011, 06:06 AM
  2. OLE automation and C++
    By tkennedy in forum C++ Programming
    Replies: 3
    Last Post: 11-17-2006, 08:48 AM
  3. Automation Anywhere
    By danno.c in forum C# Programming
    Replies: 1
    Last Post: 08-07-2005, 10:10 AM
  4. Automation Doubt
    By saravanan_ts in forum Windows Programming
    Replies: 0
    Last Post: 09-25-2003, 01:49 AM
  5. Automation (or similar) without MFC
    By Robert602 in forum Windows Programming
    Replies: 0
    Last Post: 11-14-2002, 10:29 AM