Amit Agarwal Linux and Photography Blog

partner
e-mail
31Jul/100

Auto Key press fill forms through simulating key presses | Linux.com

Auto Key press fill forms through simulating key presses | Linux.com
Hot:sun Auto Key press fill forms through simulating key presses | Linux.comsun Auto Key press fill forms through simulating key presses | Linux.comsun Auto Key press fill forms through simulating key presses | Linux.comsun dark Auto Key press fill forms through simulating key presses | Linux.comsun dark Auto Key press fill forms through simulating key presses | Linux.com

This script can be used to repeatedly press keys on the keyboard, it was used to fill out 100 odd entries on a web page while testing without having to physically enter the data.

Save the code below some where like /usr/bin/ with what ever file name you like, set the file to be executable with chmod +x /usr/bin/keyrepeat

you can then run the command keyrepeat 100 "1" or what ever you chose as the filename of your script.

You will have 5 seconds to focus a window, the program will then simulate a user pressing the keys on the keyboard.

sleep 5 #delay to allow the user to focus a window number=$1 #first parameter, number of times to repeat text=$2 #second parameter, text to repeat will interpret as tab for ((counter=1;counter< =$number;counter+=1)); do #loop required number of times xvkbd -xsendevent -text $text #this sends the text as key presses done

http://www.linux.com/community/blogs/auto-key-press-fill-forms-through-simulating-key-presses.html

Enhanced by Zemanta
suggest
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • blogmarks
  • Blogosphere News
  • co.mments
  • HelloTxt
  • Ping.fm
  • Reddit
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Twitter
  • Yahoo! Bookmarks
  • Add to favorites
  • BlinkList
  • Diigo
  • email
  • Identi.ca
  • LinkedIn
  • Live
  • MyShare
  • MySpace
  • PDF
  • SheToldMe
  • Slashdot
  • Socialogs
  • Tumblr

related post

Technorati Tags: html, key press, keyboard, Keyboards, Linux, lt, Mouse and Keyboard, number 1, Operating Systems, parameter number, Shareware, sleep, Utilities, Web page, Windows

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.

contact
about

Switch to our mobile site

Page optimized by WP Minify WordPress Plugin