Created
April 7, 2010 08:18
-
-
Save tknv/358653 to your computer and use it in GitHub Desktop.
death agony!!!
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 | |
And catch exception in rake task(who don't use rake for testing?) | |
# rake.rb | |
# setup >(rake your_task pc=a_one_of_sacrifice p=where_to_agony) 1> errIO.txt | |
task :hell_grinder do | |
begin | |
ruby "death_test.rb " | |
rescue | |
p "ring ring ring..." | |
ruby "death_agony.rb " + ENV['pc'] + " " + ENV['p'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then you can hear death agony from each sacrifice.
*Don't forget regsvr skype dll
How to regist it.