R
Ronnie Bermejo
/Hello Ruby fans/
I'm working in an small project to create a translation machine ( basically
English<->Spanish )
I'd love to call this program with a 'Key-Sequence shortcut' on Window$,
I have found some ways to do it but I am wondering if there's a ruby way to set
the shortcut .
THE IDEA IS:
1 - Ctrl-C [ love ]
2 - Key Sequence [Ctrl-Alt Z ]
3 - Ctrl-V [amor]
class TranslateClipBoard
include BabelFish
require "win32/clipboard"
def initialize
paste(translate(copy))
end
def copy
clp = Win32::Clipboard.data
return clp
end
def paste(data)
Win32::Clipboard.data = data
end
def translate(text)
res = BabelFish.translate("en_es",text)
return res
end
end
class SetShortCut
# ????????
end
*could you recommend me a (SOAP/XML) free translation service on the web to
suck the data from ?
Thanks -> Gracias
---- Msg sent via Spymac Mail - http://www.spymac.com
I'm working in an small project to create a translation machine ( basically
English<->Spanish )
I'd love to call this program with a 'Key-Sequence shortcut' on Window$,
I have found some ways to do it but I am wondering if there's a ruby way to set
the shortcut .
THE IDEA IS:
1 - Ctrl-C [ love ]
2 - Key Sequence [Ctrl-Alt Z ]
3 - Ctrl-V [amor]
class TranslateClipBoard
include BabelFish
require "win32/clipboard"
def initialize
paste(translate(copy))
end
def copy
clp = Win32::Clipboard.data
return clp
end
def paste(data)
Win32::Clipboard.data = data
end
def translate(text)
res = BabelFish.translate("en_es",text)
return res
end
end
class SetShortCut
# ????????
end
*could you recommend me a (SOAP/XML) free translation service on the web to
suck the data from ?
Thanks -> Gracias
---- Msg sent via Spymac Mail - http://www.spymac.com