Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| cloudahk [2023-07-15 12:38] – ↷ Page moved from playground:cloudahk to cloudahk geek | cloudahk [2024-02-08 02:01] (current) – Add compiler section geek | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== CloudAHK | + | ====== CloudAHK |
| - | < | + | |
| - | <panel title="v1"> | + | The CloudAHK code runner sandbox is a service by [[user: |
| - | < | + | |
| - | </ | + | Check out the source code of the service [[https:// |
| - | <panel title="v2"> | + | |
| - | <runner ahk2>;v2 | + | ===== AutoHotkey |
| - | msgbox | + | |
| - | </panel> | + | < |
| - | </accordion> | + | MsgBox hi |
| + | </ | ||
| + | |||
| + | ===== AutoHotkey | ||
| + | |||
| + | <runner ahk2> | ||
| + | MsgBox | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Converter ===== | ||
| + | |||
| + | Attempt to convert AHKv1 syntax to AHKv2 using the [[https:// | ||
| + | |||
| + | < | ||
| + | ; Requires AutoHotkey v1.1.26+, and the keyboard hook must be installed. | ||
| + | # | ||
| + | SendSuppressedKeyUp(key) { | ||
| + | DllCall(" | ||
| + | , " | ||
| + | , " | ||
| + | , " | ||
| + | , " | ||
| + | } | ||
| + | |||
| + | ; Disable Alt+key shortcuts for the IME. | ||
| + | ~LAlt:: | ||
| + | |||
| + | ; Test hotkey: | ||
| + | !CapsLock:: | ||
| + | |||
| + | ; Remap CapsLock to LCtrl in a way compatible with IME. | ||
| + | *CapsLock:: | ||
| + | Send {Blind}{LCtrl DownR} | ||
| + | SendSuppressedKeyUp(" | ||
| + | return | ||
| + | *CapsLock up:: | ||
| + | Send {Blind}{LCtrl Up} | ||
| + | return | ||
| + | </converter> | ||
| + | |||
| + | ===== Compiler ===== | ||
| + | |||
| + | Compile C code to an AHK-compatible loader function. | ||
| + | |||
| + | < | ||
| + | #include < | ||
| + | |||
| + | MCL_EXPORT(add, | ||
| + | int add(int a, int b) { | ||
| + | return a + b; | ||
| + | } | ||
| + | |||
| + | MCL_EXPORT(sub, | ||
| + | int sub(int a, int b) { | ||
| + | return a - b; | ||
| + | } | ||
| + | |||
| + | MCL_EXPORT(mul, | ||
| + | int mul(int a, int b) { | ||
| + | return a * b; | ||
| + | } | ||
| + | </compiler> | ||