2010/12/10

Project flow managers in Multi Thread

As you have noticed, there is another exe: XHEManager in program root version 4.0.12. With the help of scripts the execution in multithreaded mode can be greatly simplified. Despite the fact that the Manager can copy the folder with the program by special option from the File menu, there is more economical and simple way, which will be described below.

Let's start with the preparation of the script. Find (or add to the right script top, if that line isn’t exists) variable “$xhe_host ="127.0.0.1:7010" ”; for script running without any problems, you need to replace the port in that line to a variable "$argv[1]”.

This line will look like this: “$xhe_host ="127.0.0.1:".$argv[1]”; If it is planned to use the restart at the script ($app-> restart), then the variable “$ argv [1]” also should be replaced with the arguments “$params” and “$ port”. That is, the function will look like this: “$app-> restart($scriptpath ="",$argv [1], $argv [1])”;

The results of our manipulations allow passing to the script all the necessary for the work data, so it only needs to add the task through the manager. It is needed to check the program path at menu "Add", to point the script path and to set the port number at line "Port". Quantity of desired threads can be determined by clicking on the appropriate check mark.

After all done, you can start the flows you need, separating them by “ctrl” and click the button "Run". Manager will open the needed number of program copies in turn and will train scripts.

The pause time between starting the program copies can be set in Preferences.

  • The button "Stop all" closes all running the Emulator copies, but don’t stop the work of their scripts.

  • You can learn more about the purpose of a button from the pop reference, if you stop the cursor on it.

2010/12/08

The latest Web Emulator updates.

Scientists say that between the time when caveman picked up a stick to beat off the enemy and the bow and arrows invention about two and a half million years had elapsed. Fortunately, in our time, progress moves a little faster. Human Emulator has greatly expanded its capabilities just near three months. Of course, with the help of users and programmers.

A small overview of program key features that emerged after the release of version 4.0:

The most anticipated the program features, no doubt, was capture and the opening of any pop-up windows in new program inlays, for example Firefox. Now it is not necessary to cut out the attributes of “target = "_blank"” in links, or to disassemble the post-request forms, submitted data to new window. Stumbling on the pop-up, the script will simply continue working with him in a new tab. When all planned operations end it will return to the main operation.

The proxy-checker functional has been significantly improved and expanded also. Now you cancheck proxies for anonymity and the ability to pass post-queries. You can control his work full from a script and work in parallel with test other tasks / scripts in an Emulator.

Unfortunately, because of the lack of examples and explanations, the object $ Raw appearance functional in program was rather quiet. Now this fault is disposed and everyone can evaluate the opportunities that complete control over the exchange of data provides between the browser and the server. The rest entirely depends on User’s objectives and fantasy.

The opportunity to work with the security warning dialog box and files downloading became a welcome addition to everything else done. You can now fully turn off the first, for messages about the transition to a secure connection, etc. not interfering more. Second, you can set the path for default downloading, to which all interesting for your file will be saved without asking user permission and not stopping the process thereby.

Multithreaded version has got separate settings for each program copy, even being running from one place needed number of times.

The updates “for convenience”:

You can go, for example, directly to the function usage, or its directory description on the site, from dialogue code adding (alt+ctrl+right).This greatly reduces the time of searching information you need, and reduces the chance to "miss the idea" you wish to realize). The function “find_and_navigate_on_link_by_number” was added to the object “$ mail”. With the help of it, the registration confirmation and account activation comes easier to use and write.

To the commands that return the list of something after their development (for example “get_all_urls”), added the argument “$ separator”. It will separate one row from another. The default used " " but it can be better in different cases to use" \ r \ n ", or "; ".

The ability to specify "Default" folder for scripts was added. New scripts will be created at the new location after its shift. “File-> Open” will display the contents of you specified folder primordially.

We try to do everything in our’s power to maintain for users the product urgency and usefulness. So, we ready to listen and note all your wishes about the functional expanding, additions and corrections.

2010/12/07

The image search on page function.

At the Human Emulator program version 4.0.10 were added two functions: “get_x_in_webpage_picture” and “get_u_in_webpage_picture” to the "$webpage" object. Their emergence has passed quietly, but it also deserves separate description cause of opportunity it gives.


The ability to find coordinates of something by the image pattern – is the aim of these functions. The image on the picture is compared automatically with site screenshot. The coordinates computed and returned when they coincide. If desired element "floats" with each page refreshing or you're working with Flash, in which is difficult to make a script, using only the cliques in the coordinates, - then these functions will help.


For example, let's get on page http://tinymce.moxiecode.com/examples/full.php and make the image sample. The image size is not particularly important, the function will return the coordinates of the first full match. The comparison is the result of color and position of each pixel. You have to save image in bmp extension and 24 bpp. There is a copy of picture I took for the experiments:


XHE

Now there is the script turn. You can get the coordinates, using the following code:


require("../Templates/xweb_human_emulator.php");

$x=$webpage->get_x_in_webpage_picture("C:\\1.bmp");
$y=$webpage->get_y_in_webpage_picture("C:\\1.bmp");
echo " The coordinates of the image:$x $y";

As you guessed, I named the picture «1.bmp» and saved it in drive C: root. Now, after running this script, we will have its coordinates. You can easily click on them by function “$mouse-> click ($x, $y);” when you have its coordinates. Add it to your script, check the result and experiment with other samples.


Thus, you can adapt the mouse work with the help of these functions, regardless of the browser window size and key elements location.


Convenient functional for saving pictures samples will be added in upcoming versions. Feel free to say any of your thoughts about the expansion of these functions in ICQ Support.