Skip to content

Instantly share code, notes, and snippets.

View masoo's full-sized avatar
🐔
In the chicken

FUNABARA Masao masoo

🐔
In the chicken
View GitHub Profile
@masoo
masoo / ruby-csharp_script_sample006.rb
Created July 15, 2016 14:28
ruby-csharp_script sample #6
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
"Hello, Ruby!"
EOS
result = csharp_script.EvaluateAsync(code)
p result
@masoo
masoo / ruby-csharp_script_sample005.rb
Created July 15, 2016 14:27
ruby-csharp_script sample #5
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
10.08
EOS
result = csharp_script.EvaluateAsync(code)
p result
@masoo
masoo / ruby-csharp_script_sample004.rb
Created July 15, 2016 14:26
ruby-csharp_script sample #4
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
1
EOS
result = csharp_script.EvaluateAsync(code)
p result
@masoo
masoo / ruby-csharp_script_sample003.rb
Created July 15, 2016 14:24
ruby-csharp_script sample #3
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
#r "PresentationFramework "
using System;
using System.Windows;
using System.Windows.Controls;
@masoo
masoo / ruby-csharp_script_sample002.rb
Created July 15, 2016 14:23
ruby-csharp_script sample #2
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
#r "PresentationFramework"
using System;
using System.Windows;
var result = MessageBox.Show(
@masoo
masoo / ruby-csharp_script_sample001.rb
Created July 15, 2016 14:21
ruby-csharp_script sample #1
require 'win32ole'
csharp_script = WIN32OLE.new('ruby.csharp_script.CsharpScript')
code = <<"EOS"
#r "System"
using System;
for (int i=0; i<10; i++) {
Console.WriteLine(i.ToString(" 0"));
}
@masoo
masoo / full_screen.rb
Created December 19, 2013 04:47
masoojer の画面を最大化にする。
# -*- coding: utf-8 -*-
require 'mscorlib'
require 'System'
require 'PresentationFramework'
module Masoojer
def self.full_screen
if @full_screen_toggle then
self.full_screen_off
else
@masoo
masoo / dqmp.rb
Created December 11, 2013 00:35
masoojer でドラゴンクエスト モンスターパレードをする。
# -*- coding: utf-8 -*-
require 'mscorlib'
require 'System'
require 'PresentationFramework'
module Masoojer
def self.dqmp
@webbrowser = System::Windows::Controls::WebBrowser.new
@webbrowser.Name = "DqmpWebBrowser"
@webbrowser.Height = System::Double.NaN
@masoo
masoo / kancolle.rb
Created December 7, 2013 08:20
masoojer で艦隊これくしょんをする。
# -*- coding: utf-8 -*-
require 'mscorlib'
require 'System'
require 'PresentationFramework'
module Masoojer
def self.kancolle
@webbrowser = System::Windows::Controls::WebBrowser.new
@webbrowser.Name = "KancolleWebBrowser"
@webbrowser.Height = System::Double.NaN
@masoo
masoo / secret_protection.rb
Created December 6, 2013 15:48
masoojer で編集中の文章の秘密を保護する。
# -*- coding: utf-8 -*-
module Masoojer
def self.secret_protection(begin_position, end_position)
replace_string = "■" * (end_position - begin_position)
$azukiControl.Document.Replace(replace_string, begin_position, end_position)
end
end
menu_sp = System::Windows::Controls::MenuItem.new()