function sikuli_step(sikuli_intent) {sikuli_count++;
if (sikuli_count == 1) sikuli_handshake(); // handshake on first call
var ds; if (flow_path.indexOf('/') !== -1) ds = '/'; else ds = '\\';
var fs = require('fs'); fs.write('tagui.sikuli'+ds+'tagui_sikuli.in','['+sikuli_count.toString()+'] '+sikuli_intent,'w');
var sikuli_result = ''; do {sleep(1000); sikuli_result = fs.read('tagui.sikuli'+ds+'tagui_sikuli.out').trim();}
while (sikuli_result.indexOf('['+sikuli_count.toString()+'] ') == -1);
if (sikuli_result.indexOf('SUCCESS') !== -1) return true; else return false;}
// for using sikuli visual automation instead of casperjs
for using sikuli visual automation instead of casperjs
for using sikuli visual automation instead of casperjs
function sikuli_step(sikuli_intent) {sikuli_count++;
if (sikuli_count == 1) sikuli_handshake(); 
var ds; if (flow_path.indexOf('/') !== -1) ds = '/'; else ds = '\\';
var fs = require('fs'); fs.write('tagui.sikuli'+ds+'tagui_sikuli.in','['+sikuli_count.toString()+'] '+sikuli_intent,'w');
var sikuli_result = ''; do {sleep(1000); sikuli_result = fs.read('tagui.sikuli'+ds+'tagui_sikuli.out').trim();}
while (sikuli_result.indexOf('['+sikuli_count.toString()+'] ') == -1);
if (sikuli_result.indexOf('SUCCESS') !== -1) return true; else return false;}
function sikuli_step ( sikuli_intent ) { sikuli_count ++ ; if ( sikuli_count == 1 ) sikuli_handshake ( ) ; var ds ; if ( flow_path . indexOf ( '/' ) !== - 1 ) ds = '/' ; else ds = '\\' ; var fs = require ( 'fs' ) ; fs . write ( 'tagui.sikuli' + ds + 'tagui_sikuli.in' , '[' + sikuli_count . toString ( ) + '] ' + sikuli_intent , 'w' ) ; var sikuli_result = '' ; do { sleep ( 1000 ) ; sikuli_result = fs . read ( 'tagui.sikuli' + ds + 'tagui_sikuli.out' ) . trim ( ) ; } while ( sikuli_result . indexOf ( '[' + sikuli_count . toString ( ) + '] ' ) == - 1 ) ; if ( sikuli_result . indexOf ( 'SUCCESS' ) !== - 1 ) return true ; else return false ; }
for using sikuli visual automation instead of casperjs
for using sikuli visual automation instead of casperjs
// handshake on first call