Created
April 19, 2011 14:38
-
-
Save tknv/928092 to your computer and use it in GitHub Desktop.
death_agony.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# death_agony.rb | |
#! ruby -Ku | |
require 'rubygems' | |
require 'win32ole' | |
require 'kconv' | |
$KCODE = 'UTF8' | |
@MACHINE = ARGV[0] | |
@GOD = ARGV[1] | |
@oCom=WIN32OLE.new('AutoItX3.Control') | |
@oSkype=WIN32OLE.new('Skype4COM.skype') | |
raise "Please start skype" @oSkype.Client.IsRunning != true | |
death_agnoy = IO.read('errIO.txt') | |
@oSkype.SendMessage(@GOD, "Death Agony from #{@MACHINE} at #{Time.now}\n" + death_agony) | |
sleep(3) | |
@oUser = @oSkype.User(@GOD) | |
@oCall = @oSkype.PlaceCall(@oUser.Handle) | |
@oCall.Status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment