kanji koohii FORUM
AutoHotkey scripts - Printable Version

+- kanji koohii FORUM (http://forum.koohii.com)
+-- Forum: Learning Japanese (http://forum.koohii.com/forum-4.html)
+--- Forum: Off topic (http://forum.koohii.com/forum-13.html)
+--- Thread: AutoHotkey scripts (/thread-7950.html)



AutoHotkey scripts - Sebastian - 2011-06-27

Autohotkey's site Wrote:AutoHotkey is a free, open-source utility for Windows. With it, you can:

* Automate almost anything by sending keystrokes and mouse clicks. You can write a mouse or keyboard macro by hand or use the macro recorder.
* Create hotkeys for keyboard, joystick, and mouse. Virtually any key, button, or combination can become a hotkey.
* Expand abbreviations as you type them. For example, typing "btw" can automatically produce "by the way".
* Create custom data-entry forms, user interfaces, and menu bars. See GUI for details.
* Remap keys and buttons on your keyboard, joystick, and mouse.
* Respond to signals from hand-held remote controls via the WinLIRC client script.
* Run existing AutoIt v2 scripts and enhance them with new capabilities.
* Convert any script into an EXE file that can be run on computers that don't have AutoHotkey installed.
If you have useful or interesting AutoHotkey scripts, share them here.

If the script is too long, you can use something like Pastebin


This one lets you review in this site using the arrow keys.

Down = Flip card
Left = Fail the card
Right = Pass (normal, not easy)
Control+Left = Undo
Up = Use "copy to clipboard" function from Rikaichan when the popup is on screen.
Control+Up = Same as above, but it uses tha "save to file" function.

This script will work only in the Review page when CapsLock is On (so you can use the keys normally when editing stories, etc.)

Feel free to use or modify.

Quote:SetTitleMatchMode, 2

#IfWinActive Flashcard Review

sc150:: ; Down key
GetKeyState, Caps, CapsLock, T
if Caps = D
send {Space}
else
send {Down}
return
sc14D:: ; Right Key
GetKeyState, Caps, CapsLock, T
if Caps = D
send {Y}
else
send {Right}
return
sc14B:: ; Left key
GetKeyState, Caps, CapsLock, T
if Caps = D
send {N}
else
send {Left}
return
sc148:: ; Up key
GetKeyState, Caps, CapsLock, T
if Caps = D
send {c}
else
send {Up}
return
^sc148:: ; Ctrl Up
GetKeyState, Caps, CapsLock, T
if Caps = D
send {S}
else
send ^{Up}
return
^sc14B:: ; Ctrl Left
GetKeyState, Caps, CapsLock, T
if Caps = D
send {U} ;ctrl+Izquierda
else
send ^{Left}
return
Save the script to a .ahk file and run it with AutoHotkey.

This scripts is very simple, and probably there are better or simpler ways of accomplishing the same. The idea is that you can change the keybord shortcuts to whatever fits your needs or tastes better. For example, you could do something similar to change Anki's shortcuts if you want to use the right hand for reviewing.

With AutoHotkey you can do much more, this is just something I wrote for myself and thought that someone else could have some use for it.


AutoHotkey scripts - cb4960 - 2011-06-27

Sebastian Wrote:For example, you could do something similar to change Anki's shortcuts if you want to use the right hand for reviewing.
That's what I do:

Code:
SetTitleMatchMode, 2
#IfWinActive, - Anki
j::1
k::2
l::3
`;::4
p::^z
return
English:
If Anki is currently active, then map the j, k, l and ; keys to 1 (again), 2 (hard), 3 (good), 4 (easy) and map the p key to Ctrl-Z (undo).