Code Monkey home page Code Monkey logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Hi -

This python script, if you are to write it, needs to skip the timestamp on each 
line
of the log file, and then produce

KeyStrPress   K
KeyStrRelease K

for each character key K it finds, and similarly for function keys as well. 
Note that
some function key strings need to be converted to xmacro format first (see 
issue 12).
Also, every newline should produce

KeyStrPress   Return
KeyStrRelease Return

and only lines starting with timestamps should be parsed. This is whole spec. :)

If you will create such python script, I will be happy to host it, or link to it
should you wish to host it yourself. :)


Have I considered using GitHub? 
No, not really. I like Google just fine. :รพ

Original comment by [email protected] on 30 Mar 2010 at 12:34

  • Changed title: Logged keys playback with xmacro
  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from logkeys.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Issue 12 has been merged into this issue.

Original comment by [email protected] on 30 Mar 2010 at 12:35

from logkeys.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
It appears that symbol keys (e.g. '-') need to be translated as well.

Good luck. :)

Original comment by [email protected] on 30 Mar 2010 at 12:38

from logkeys.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Attached is python script to convert logkeys format to xmacro.

Usage:
python logkeys_to_xmacro logkeys.log logkeys.xmacro

To play back the keystrokes in your Linux environment:
xmacroplay :0.0 < logkeys.xmacro

This beats out Expect script anyday :)  No care for tty or serial whatever.  
xmacroplay is great for entering sudo password for repetitive task.  

You can use xmacroplay combine with wmctrl to automatically launch Firefox, log 
onto 
a website, make a comment, logout, and close Firefox.  This is done while you 
are 
having your dinner. :) keke

Original comment by [email protected] on 30 Mar 2010 at 1:48

Attachments:

from logkeys.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Well done, it works. :)
The script is buggy, but so are logkeys and xmacro.

What works is *lower-case alpha-numeric ASCII characters, and some function 
keys*,
namely those translated by the script. Nothing else does (UTF-8 chars, 
upper-case
chars, punctuation, some function keys, key repetition).

If you ever wish to extend the script, please do so anytime by submitting a 
newer
version.

Meanwhile I will link to it, as if you find it useful, somebody else might too.

Thanks. :)

Original comment by [email protected] on 30 Mar 2010 at 5:16

  • Changed state: Done

from logkeys.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Thanks for the feedback!  I whipped this up because I needed to do a little
regression on a webform I'm building.

I believed upper-case also work.  Xmacro treats capital letter as KeyStrPress 
Shft_L,
KeyStrPress a, KeyStrRelease a, and KeyStrRelease Shft_L.  The combinations 
create
capital letter "A".  KeyStrPress A is equivalent to "a".

I have limited support for key repetition and as for UTF-8 chars, punctuation, 
and
some function keys ... those are not implemented.  When I encounter them in my 
test,
I'll modify the script to accommodate.

BTW, the script is licensed public domain. :)

Original comment by [email protected] on 30 Mar 2010 at 6:53

from logkeys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.