Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xdo

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xdo

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

-- This file is part of Xdo. Copyright © 2009, 2010 Marvin Gülker Initia in potestate nostra sunt, de eventu fortuna iudicat. ++ =XDo XDo is a library to simulate keyboard and mouse input and manipulating windows on the X server. It's wrapped around the command-line tools xdotool[http://www.semicomplete.com/projects/xdotool/], xsel[http://linux.die.net/man/1/xsel], xwininfo[http://linux.die.net/man/1/xwininfo], eject[http://linux.die.net/man/1/eject] and xkill[http://linux.die.net/man/1/xkill], so you will need to have them installed if you want to use Xdo (even if xwininfo, eject and xkill are usually already installed). If not, try to install them via your favourite packaging manager. After they're installed, install XDo via RubyGems: sudo gem install xdo ==Usage #Require some of XDo's files require "xdo/keyboard" require "xdo/mouse" require "xdo/xwindow" #Move the cursor XDo::Mouse.move(100, 100) #Simulate text (with special escape sequences!) XDo::Keyboard.simulate("This is{TAB}text.") #Some sequences can be shortened: XDo::Keyboard.simulate("This ist\ttext.") #And this will move a window containing the string "gedit", #unless it's maximized. win = XDo::XWindow.from_title(/gedit/) win.move(200, 200) ==Files You can require the following files in your projects:

  • xdo/clipboard: Clipboard access
  • xdo/drive: Get control of CD/DVD devices
  • xdo/keyboard: Pretty self-explaining
  • xdo/mouse: Automate the mouse
  • xdo/xwindow: Manipulate windows in various ways As an helpful extra, I created an executable ruby file "xinfo.rb". Thanks to RubyGems, you can start this GUI tool right from the command line by typing: xinfo.rb It's by far not perfect, maybe not even good, but I think it can be useful sometimes (you will need to have wxRuby installed, try sudo gem install wxruby-ruby19). If you're looking for a more professional program, try the "X window information" tool. ==Notes
  • If your +xdotool+ seems to reject the --window option, you are not using the current version. Try building the newest one from the source.
  • I recommand the "X window information" tool to get infos about your windows if you aren't satisfied by the xinfo.rb shipped with this package. ==Fairly incomplete
  • I'm sure there are several things I didn't notice that can be automated somehow. If you know about, email me! Please add a description of the possibilities and a sample script.
  • Another interesting thing are the samples. There are many Linux distrubitions out there, and even many of them rely on X. I cannot test with another than a recent Ubuntu machine, but if you want to contribute and send samples for another OS, I want to encourage you to - I surely won't reject your work. :-) ==License/Copyright Copyright © 2009, 2010 Marvin Gülker This library is free software; you may redistribute it and/or modify it under the terms of Ruby's license (see http://www.ruby-lang.org/en/LICENSE.txt). You can contact me at sutniuq ät gmx Dot net. Initia in potestate nostra sunt, de eventu fortuna iudicat.

FAQs

Package last updated on 06 Nov 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc