CODEX – All commands explanations (text)

      open("url")

Example: open(“http://google.com”).
Action: Will open the webpage.

      open("url","False")

Example: open(“http://google.com”,“False”).
Action: Will open the webpage, but it will not wait for the page to be fully loaded. It will go instantly to the next command. This is useful when a page is loading very slow.

      set("tagname","property to search","property value","property to change","value to change")

Example: set(“input”,“name”,“user_name”,“value”,“%%username%%”)
Action: It will insert a value in a form, In this case, it will insert the username in the username input field.

      invokemember("tagname","property to search","property value","click")

Example: invokemember(“input”,“name”,“submit”,“click”)
Action: It will click on a element. In this case, it will click on the submit button.

      invokemember("tagname","property to search","property value","focus")

Example: invokemember(“input”,“name”,“user_name”,“click”)
Action: It will click in a filed. In this case, it will click in the username input field.

      get("tagname","property to search","property value","innerhtml|innertext")

Example: %%chksrc%%=get(“body”,“”,“”,“innertext”)
Action: It will get the page text into the variable %%chksrc%%.
Example 2: %%chksrc%%=get(“body”,“”,“”,“innerhtml”).
Action: It will get the page source text into the variable %%chksrc%%.

      browserwait("maximum seconds to wait")

Example:
invokemember(“input”,“name”,“submit”,“click”)
browserwait(“30”)
Action: It will wait a maximum of 30 seconds for the new page to be loaded. This command will be used only after submit button will be clicked.
Without this command, the engine will not wait for the new page to be loaded before preceding to next command.

      pause("seconds")

Example: pause(“5”)
Action: It will pause the script for 5 seconds.

      alert("message")

Example: alert(“This is a message”)
Action: It will display a popup message. In this case it will display “This is a message” popup message.

      textbox("message")

Example: textbox(“This is a message”)
Action: It will display a textbox message. Text can be copied from this textbox.

      calc("math")

Example: math_answer%%=calc(“2+4”)
Action: It will solve math question and save the result into the variable %%math_answer%%. Useful to solve antibot math questions.

      getimage("tagname","property to search","property value","path")

Example: getimage(“img”,“id”,“captcha”,“%%path%%”)
Action: It will get the captcha image and save it to %%path%% variable.

      saveimage("property to search","property value","path")

Example: saveimage(“id”,“captcha”,“%%path%%”)
Action: It will get the captcha image and save it to %%path%% variable.

      saveimagesrc("part of src to search","path")

Example: saveimagesrc(“securimage_show.php”,“%%path%%”)
Action: It will get the captcha image and save it to %%path%% variable.

      captcha("image path")

Example: %%Captcha_Response%%=captcha(“%%path%%”)
Action: It will send the captcha image to a captcha service and save the received response to %%Captcha_Response%% variable.

      captcha_next()

Example: %%next_captcha%%=captcha_next()
Action: It will use the next captcha service that was set in Captcha Options/Priority and save the received response to %%next_captcha%% variable.

      Captcha code Example:

%%random_name%%=“{a|b|c|1|2|3}{1|2|3|a|b|c|}{d|e|f|4|5|6}{4|5|6|d|e|f}{g|h|i|8|9|0}{8|9|0|g|h|i}“
%%path%%=”%%app_path%%\tmp\%%random_name%%.png”
getimage(“img”,”id”,“si_image_reg”,“%%path%%”)
set(“input”,“name”,“captcha_code”,“value”,“Solving…”)
%%Captcha_Response%%=captcha(“%%path%%”)
set(“input”,“name”,“captcha_code”,“value”,“%%Captcha_Response%%”)

      regex("text where to search","regex code","group number")

Example:
%%chksrc%%=get(“body”,“”,“”,“innerhtml”)
%%Regex_response%%=Regex(“%%chksrc%%”,“(?⇐<p class=\Werror\W>).*(?=</p>)”,“0”)
Action: It will get from source page a text/word and save the received response to %%Regex_response%% variable.

      regexreplace("text where to search","regex code","replace text/word/value")

Example:
%%chksrc%%=get(“body”,“”,“”,“innerhtml”)
%%Regex_response%%=regexreplace(“%%chksrc%%”,“<p class”,“new word”)
Action: It will get from source page a text/word and will replace that value with the second value, then save the received response to %%Regex_response%% variable.

      string_replace("text where to search","find text/word/value","replace text/word/value")

Example:
%%chksrc%%=get(“body”,“”,“”,“innerhtml”)
%%Regex_response%%=string_replace(“%%chksrc%%”,“old”,“new”)
Action: It will get from source page a text/word/value and will replace that value with the second value, then save the received response to %%Regex_response%% variable.

      invokescript("javascript code")

Example: invokescript(“document.getElementById(‘user_login’).value=’%%username%%’;”)
Action: It will run javascript codes, like input to fields, disable rich text editors, etc.

      download("url","path")

Example: %%File_Downloaded%%=download(“http://anysite.com/image.jpg”,”%%path%%”)
Action: It will download any type of file to %%path%% variable.

      
      url("AbsolutePath|AbsoluteUri|Authority")

Example: %%Browser_URL%%=url(“AbsoluteUri”)
Action: It will get the current browser URL address and save it to %%Browser_URL%% variable.

      save_link("<nowiki>%%Link%%</nowiki>")

Example: save_link(“%%Output_URL%%”)
Action: It will the %%Output_URL%% value to Reports tab.

      file_read("path")

Example: %%mail_file%%=file_read(“%%email_file%%”)
Action: It will read a file (path/email.txt) and load it to %%mail_file%% variable.

      goto("location")

Example: goto(“new_location”)
Action: It will go the line that start with the text “new_location”.

      if_X("value"[==|~=|<>|~!]"value to compare") 
      end_if_X

Example:
%%chksrc%%=get(“body”,“”,“”,“innertext”)
If_1 (“%%chksrc%%”~=“Your registration was successful”)
result_output(“REGISTRATION SUCCESSFUL – Email Verification Needed”)
Exit()
End_If_1
Action: It will compare a variable/value to another value then will do the set commands. In this case, it will check the page text and compare with the second value. If the statement is true, it will output to application the set output, then Exit the script.
Parameters:
== equal
!= not equal
~= parcial equal
~! parcial not equal
« smaller than (integer)

bigger than (integer)
      exit()

Example: exit()
Action: It will exit and close the script.

      ";"

Example: ; this is a comment
Action: It will ignore the text after the “;”

      Commands to output messages into the application:

result_username(“value”) It will send a value into the Username cell.
result_password(“value”) It will send a value into the Password cell.
result_email(“value”) It will send a value into the Email cell.
result_output(“value”) It will send a value into the Output cell.
result_email_check(“value”) It will send a value into the Email_Check cell (hidden value).
result_custom_1(“value”) It will send a value into the Custom_1 cell (hidden value).