I built a script that does a job for me, and I'd like to call from time
to time, even when the script isn't running. Is there a way I can assign
a global hot key in ruby so that whenever I press the hotkey it launches
it.
You'd need to use something like AutoHotkey for that. I've never used
it with Ruby, but it could be done.
···
On Sat, Oct 23, 2010 at 9:11 AM, Ted Flethuseo <flethuseo@gmail.com> wrote:
I built a script that does a job for me, and I'd like to call from time
to time, even when the script isn't running. Is there a way I can assign
a global hot key in ruby so that whenever I press the hotkey it launches
it.
You'd need to use something like AutoHotkey for that. I've never used
it with Ruby, but it could be done.
AutoHotkey would be more my area of knowledge. You might be interested
that AHK now has a DLL with COM support. This would make embedding AHK
in Ruby quite simple:
require "WIN32OLE"
code = "#NoTrayIcon\n" +
"^m:: MsgBox, Hotkey created with AHK in Ruby"
Hi,
This is cool. I was wondering though.. is it preferable to copy the
AutoHotkey.dll file to some special location before registering it, or
does registering it mean that it actually copies it to some windows
directory. (Is there a specific windows directory for dlls?)
Ted
Jethrow .. wrote in post #956604:
···
Eric Christopherson wrote in post #956560:
You'd need to use something like AutoHotkey for that. I've never used
it with Ruby, but it could be done.
AutoHotkey would be more my area of knowledge. You might be interested
that AHK now has a DLL with COM support. This would make embedding AHK
in Ruby quite simple:
require "WIN32OLE"
code = "#NoTrayIcon\n" +
"^m:: MsgBox, Hotkey created with AHK in Ruby"
... does registering it mean that it actually copies it to some windows
directory. (Is there a specific windows directory for dlls?
Registering does not create a copy. Registering will make it so you can
create a COM object (WIN32OLE.new), but the DLL will remain wherever it
was when you registered it. Personally, I keep it in the same directory
as my AHK installation. However, many DLL files are located in the
Windows Directory.
To practice a little bit, I made some simple scripts to demonstrate
using AutoHotkey with Ruby, and put them on GitHub. What I have so far
is at:
···
On Sun, Oct 24, 2010 at 11:34 PM, Jethrow .. <jethrow@gmx.com> wrote:
Ted Flethuseo wrote in post #956795:
... does registering it mean that it actually copies it to some windows
directory. (Is there a specific windows directory for dlls?
Registering does not create a copy. Registering will make it so you can
create a COM object (WIN32OLE.new), but the DLL will remain wherever it
was when you registered it. Personally, I keep it in the same directory
as my AHK installation. However, many DLL files are located in the
Windows Directory.
On Sun, Oct 24, 2010 at 11:34 PM, Jethrow .. <jethrow@gmx.com> wrote:
On a side note, the maintainer of the DLL has been updating it regularly
recently. He provided a direct link for the Windows (32 bit) Unicode
version: http://www.autohotkey.net/~HotKeyIt/AutoHotkey.dll
To practice a little bit, I made some simple scripts to demonstrate
using AutoHotkey with Ruby, and put them on GitHub. What I have so far
is at: