@Letti42 I made a better version of getMessage from applab since i was doing the github thing this one uses callbacks
function getMessage(path, estSize, callback) {
if (typeof path !== 'string' && typeof callback !== 'function') return 'Bad params';
var canvas = 'hash_canvas' + Math.floor(Math.random() * 999999);
createCanvas(canvas,5e3,1);
setProperty(canvas, "x", 320);
path += path.includes('?') ? '&' : '?';
path += 'r1=' + Math.floor(Math.random() * 99999) + '&r2=' + Math.floor(Math.random() * 99999);
drawImageURL(path, function (load) {
if (!load) { return false }
var data = getImageData(0, 0, estSize, 1);
console.log(data.data.length)
clearCanvas(canvas);
var msg = "";
for (var e = 0; e < data.data.length; e++) {
if (data.data[e] > 0 && data.data[e] < 255) {
msg += String.fromCharCode(data.data[e]);
}
}
if (typeof callback === 'function') {
callback(msg);
} else {
console.log(msg);
}
});
}