-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-robotjs.js
More file actions
28 lines (23 loc) · 850 Bytes
/
check-robotjs.js
File metadata and controls
28 lines (23 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const fs = require('fs');
const path = require('path');
// Check if robotjs was rebuilt
const robotjsBuildPath = path.join(__dirname, 'node_modules', 'robotjs', 'build', 'Release', 'robotjs.node');
console.log('Checking robotjs build...');
console.log('Build path:', robotjsBuildPath);
if (fs.existsSync(robotjsBuildPath)) {
console.log('✅ robotjs.node exists');
// Check file stats
const stats = fs.statSync(robotjsBuildPath);
console.log('File size:', stats.size);
console.log('Modified:', stats.mtime);
// Try to load it
try {
const robot = require('robotjs');
console.log('✅ robotjs loaded successfully!');
console.log('Mouse position:', robot.getMousePos());
} catch (error) {
console.error('❌ Failed to load robotjs:', error.message);
}
} else {
console.error('❌ robotjs.node not found');
}