PHP example:
<?php $xhe_host = "127.0.0.1:7010"; //connect the object to control the emulator, if not already connected if(!isset($path)) $path = "../../../Templates/xweb_human_emulator.php"; require($path); //Start echo "<hr> <font color = blue> window->".basename(__FILE__)."</font> <hr>"; //1 echo "1.Get the zero problem:"; echo $scheduler->get(0, $path, $type, $date, $time, $count, $active, $comments, $add_param)."<br>"; //2 echo "2.Let's edit the zero problem:"; $next_time = date("H: i: s", time() + 200); $new_date = date("Y-m-d"); $add_param = 15; echo $scheduler->edit(0, $path, $type, $new_date, $next_time, $count, true, $comments, $add_param); //$app->restart('', '', $app->get_port()); //end echo "<hr> <br>"; //Quit $app->quit(); ?>
Python example:
# Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7010" from xweb_human_emulator import * # Start echo("<hr> <font color = blue> scheduler.xxxxxxxxx </font> <hr>") # 1 echo("1.Get the zero problem:") path, type, date, time, count, active, comments, add_param = scheduler.get(0) echo(scheduler.get(0), "<br>") # 2 echo("2.Let's edit the zero problem:") add_param = 15 comments = comments + "edited" echo(scheduler.edit(0, path, type, date, time, count, true, comments, add_param)) # app.restart('', '', app.get_port())) # end echo("<hr> <br>") # Quit app.quit()
C# example:
#region using using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading; using XHE; using XHE.XHE_DOM; using XHE.XHE_System; using XHE.XHE_Window; using XHE.XHE_Web; #endregion class Program: XHEScript { static void Main(string [] args) { //init XHE server = "127.0.0.1:7015"; InitXHE(); //Start echo("<hr> <font color = blue> scheduler.clear_tab_content </font> <hr>"); //1 step echo("1.Let's edit the zero problem:"); echo(scheduler.edit(0, "test 0.php", 0, "2015.07.10", "10: 2: 3", - 1, true, "task 10")); //end echo("<hr> <br>"); app.quit(); } }
Java Script example:
//connect the object to control the emulator, if not already connected xhe_host = "127.0.0.1:7011"; echo = require("../../../Templates JS/xweb_human_emulator.js"); //Start echo("<hr> <font color = blue> window.edit </font> <hr>"); //1 step echo("1.Get the zero problem:"); var task = new Array(7); echo(scheduler.get(0, task) + "<br>"); //get from the array - task data var path_, type, date, time, count, active, comments; path_ = task [0]; type = task [1]; date = task [2]; time = task [3]; count = task [4]; active = task [5]; comments = task [6]; //display task data echo("path =" + path_); echo(" ntype =" + type); echo(" ndate =" + date); echo(" ntime =" + time); echo(" ncount =" + count); echo(" nactive =" + active); echo(" ncomments =" + comments); //step 2 echo(" n2.Let's edit the zero problem:"); var timeInMs = new Date(Date.now() + 900000);//now + 90 second var new_date = timeInMs.getFullYear() + "-" + timeInMs.getDate() + "-" + timeInMs.getMonth(); var new_time = timeInMs.getHours() + ":" + timeInMs.getMinutes() + ":" + timeInMs.getSeconds(); console.log(new_date); console.log(new_time); echo(scheduler.edit(0, "path", "type", new_date, new_time, count, false, "comments")); //end echo("<hr> <br>"); //Quit app.quit();