Run kantu from my website

i export html then i save it to my website example.com/kantu.html(i just removed javascript code)

then from index.html via ajax i get content of kantu.html (pass into data var)

javascript:(function() {
var evt = new CustomEvent(‘kantuSaveAndRunMacro’, { detail: { html: data, storageMode: ‘browser’ } }) ;window.dispatchEvent(evt);
})();

when i run index.php it start kantu but it show confirmation box.
first question: How can i remove confirmation box? where i need to put ?direct=1
second question: is there a way to put json into my site insteand of html
and then to run kantu , { detail: { json: jsonData, storageMode: ‘browser’ }

http://dl.a9t9.com/kantu/remotemacro1.html?direct=1 should work - but it does not work currently => I created a ticket for this issue (ticket #411), and we will fix this asap.

Some more info for other users that read this post and want to test the run macro link: Kantu only runs macros embedded in websites if this feature is turned on in the replay settings. It is turned off by default.

Not yet, but this feature could be added. Can I ask why you prefer JSON instead of HTML?

Because i can generate json from php (based on some parameters ) then store json in variable. And make a button “start kantu” on clicking it kantu will start executing json .
Thats better and more professional way . coz user will see just a button and not the html code, this helps if we have example 5 buttons for different kantu scripts .

1 Like