Re: Expanding Python as a macro language



aleaxit@xxxxxxxxx (Alex Martelli) writes:

> ...
>> But the problem is that in Linux you can't even send a keystroke to
>> a running GUI application!
> Actually, if the app is running under X11 you may try to fake out a
> keystroke event (with low level calls, but ctypes might let you use it
> from Python). Of course, the app WILL be told that the keystroke is
> fake, through a special flag if it cares to check for it, for security
> reasons; but if the app doesn't specifically defend itself in this way.

I'm pretty sure that python-xlib can do this without having to go to
low level calls.

<mike
--
Mike Meyer <mwm@xxxxxxxxx> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
.



Relevant Pages

  • Re: Expanding Python as a macro language
    ... > But the problem is that in Linux you can't even send a keystroke to ... keystroke event (with low level calls, but ctypes might let you use it ... the app WILL be told that the keystroke is ... all the interfaces are open and easily available to Python, ...
    (comp.lang.python)
  • Re: Key strokes for applications?
    ... you don't need to remember any fancy per-application keystroke ... With most app launchers like QuickSilver and Butler, ... To fancy complicated shortcut to remembr for each app :-) ... If I wanted to do it the Quicksilver way, ...
    (microsoft.public.mac.office.word)
  • Re: AppleScript: Hiding an app
    ... just need a way to remotely (via ssh) tell an app to hide. ... hiding function rather than a mere keystroke. ... several ways to hide an application (cmd-H, the menubar menu, the Dock ...
    (uk.comp.sys.mac)
  • Re: Sendkeys / keybd_event Suggestion and Help Nneeded
    ... How difficult can it be to spawn a process, send a keystroke, wait 3 ... I have spent the last 6 hours reading about shell, wait, API process ... app myself so I have full control over it if I need to do anything to ...
    (microsoft.public.vb.general.discussion)
  • Re: magical expanding hash
    ... It would take a lot of coding to make that << work right. ... Its really only one more keystroke than ... what's the shortest python idiom for get_or_set in expression? ... Prev by Date: ...
    (comp.lang.python)