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] – removed - external edit (Unknown date) 127.0.0.1 | cloudahk [2024-02-08 02:01] (current) – Add compiler section geek | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== CloudAHK Sandbox ====== | ||
| + | |||
| + | The CloudAHK code runner sandbox is a service by [[user: | ||
| + | |||
| + | Check out the source code of the service [[https:// | ||
| + | |||
| + | ===== AutoHotkey v1 ===== | ||
| + | |||
| + | < | ||
| + | MsgBox hi | ||
| + | </ | ||
| + | |||
| + | ===== AutoHotkey v2 ===== | ||
| + | |||
| + | <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 | ||
| + | </ | ||
| + | |||
| + | ===== 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; | ||
| + | } | ||
| + | </ | ||