Simulate input/Mouse: Difference between revisions

m
→‎{{header|Wren}}: Added compilation hint for C program.
m (syntax highlighting fixup automation)
m (→‎{{header|Wren}}: Added compilation hint for C program.)
 
(One intermediate revision by the same user not shown)
Line 728:
 
Xlib can of course work with any X server, local or remote.
<syntaxhighlight lang="ecmascriptwren">/* simulate_input_mouseSimulate_input_Mouse.wren */
 
var KeyPressMask = 1 << 0
Line 910:
<br>
We now embed this Wren script in the following C program, compile and run it.
<syntaxhighlight lang="c">#include/* <stdiogcc Simulate_input_Mouse.h>c -o Simulate_input_Mouse -lX11 -lwren -lm */
 
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Line 1,268 ⟶ 1,270:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "simulate_input_mouseSimulate_input_Mouse.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,476

edits