FR: 增加对supermemo的支持
YIRU69 opened this issue · 9 comments
搜了一下发现了宝藏,很感谢作者的付出,
我的Ahk 还不太多,现在自己使用supermemo,能否像作者写了anki一样,来支持supermeemo呢
出一个教程也行
求求了
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Title: FR: Add support for supermemo
I searched and found a treasure. I am very grateful to the author for his efforts.
I don't have too much Ahk. Now I use supermemo. Can I support supermeemo like the author wrote anki?
Just make a tutorial
I beg
Yep It's a good idea, tough I have no licence to use supermemo :(
基本思路
- 基本上你可以直接研究一下AHK的教程然后写一个可以独立运行的脚本来增强你的SuperMemo
- 把它扔进 CapsLockX 的 Modules 目录里,重启 CapsLockX。
- 如果没问题的话,就相当于插件安装成功了。
- 如果有报错的话,检查一下有什么函数有可能跟别的插件模块或者clx本身冲突的。
其它
作为CapsLockX的插件而不是独立脚本,有一些预定义的变量可以用:
CapsLockX_THIS_MODULE_HELP_FILE_PATH 变量
是当前模块的同名 .md 文件的路径
CapsLockX_ModuleSetup_4:
CapsLockX_THIS_MODULE_HELP_FILE_PATH = ./Modules/01.1-插件-鼠标模拟.md
#Include ./Modules/01.1-插件-鼠标模拟.ahk
Return
CapsLockXMode 变量
在 #if 条件里加入 CapsLockXMode,作用域内的的所有热键都会变成 CapsLockX + 该热键。
例如如果这样写一个模块,就创建了3个CLX热键:CLX+X, CLX+Q, CLX+C,且只在Anki窗口内生效
#if CapsLockXMode && ( WinActive("Anki -.* ahk_class QWidget ahk_exe anki.exe") || WinActive("Anki - .*|.* - Anki ahk_class Qt5QWindowIcon ahk_exe anki.exe"))
$x:: Send s ; study
$q:: Send d ; quit
$c:: Send a ; create
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
The basic idea
- Basically you can just study the AHK tutorial and write a standalone script to enhance your SuperMemo
- Drop it into CapsLockX's Modules directory and restart CapsLockX.
- If there is no problem, it is equivalent to the successful installation of the plug-in.
- If there is an error, check what functions may conflict with other plug-in modules or clx itself.
other
As a plugin for CapsLockX rather than a standalone script, there are some predefined variables available:
CapsLockX_THIS_MODULE_HELP_FILE_PATH variable
is the path to the .md file of the same name for the current module
CapsLockX_ModuleSetup_4:
CapsLockX_THIS_MODULE_HELP_FILE_PATH = ./Modules/01.1-plugins-mouse emulation.md
#Include ./Modules/01.1-plugins-mouse-simulation.ahk
Return
CapsLockXMode variable
Add CapsLockXMode to the #if condition, and all hotkeys in the scope will become CapsLockX + this hotkey.
For example, if you write a module like this, you create 3 CLX hotkeys: CLX+X, CLX+Q, CLX+C
#if CapsLockXMode && ( WinActive("Anki -.* ahk_class QWidget ahk_exe anki.exe") || WinActive("Anki - .*|.* - Anki ahk_class Qt5QWindowIcon ahk_exe anki.exe"))
$x:: Send s ; study
$q:: Send d ; quit
$c:: Send a ; create
感谢
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
grateful
追问进展 :D
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Follow up on progress :D
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.