i've been working on using code creator with a template but for some reason i can't get it to work with File.GetString, i've looked all over for an answer and i still don't understand what i've done wrong. here is a sample of how i'm trying to work with File.GetString in code creator. Any advice is much appreciated.
PHP:
<?php
import namespace System;
import namespace Zennolab:::CommandCenter;
class Step1
{
public static function Execute($instance)
{
// Going to http://lessons.zennolab.com/en/registration
$tb = $instance->MainTab;
if (($tb->IsVoid) || ($tb->IsNull)) return -1;
if ($tb->IsBusy) $tb->WaitDownloading();
$tb->Navigate("http://lessons.zennolab.com/en/registration");
if ($tb->IsBusy) $tb->WaitDownloading();
// Setting value [email] to the element with tag [input:text]
$emaila = $instance->RiseMacros("File.GetString", array( "\\Resources\\email.txt", "random", "false" ));
$email = $instance->RiseMacros("String.Split", array( $emaila, ":", "0" ));
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildById("email");
if ($he->IsVoid) {
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByAttribute("input:text", "fulltag", "input:text", "text", 0);
}
if ($he->IsVoid) return -1;
$he->SetValue($email, true);
// Executing macros
//$he->SetValue($instance->RiseMacros("File.GetString", array( "\Resources\email.txt", "random", "false" )), true);
return 0;
}
}
?>