29 lines
698 B
Text
29 lines
698 B
Text
sub _routeTasking(IN STRING $routeTxtFile, OUT STRING $routeCmd, OUT STRING $taskID, OUT STRING $targetID) {
|
|
echo "\nProcessing $routeTxtFile";
|
|
|
|
string $lines;
|
|
string $taskIDStr;
|
|
string $targetIDStr;
|
|
if (!ReadFile ($routeTxtFile, $lines)) {
|
|
return false;
|
|
}
|
|
for (int $i=0; $i < sizeof($lines); $i++) {
|
|
string $line = $lines[$i];
|
|
|
|
# TargetID is required
|
|
if (RegexMatch("TargetID", $line)) {
|
|
RegExSplit(" ", $line, 2, $targetIDStr);
|
|
$targetID = $targetIDStr[1];
|
|
}
|
|
|
|
# TaskID is required
|
|
if (RegexMatch("TaskID", $line)) {
|
|
RegExSplit(" ", $line, 2, $taskIDStr);
|
|
$taskID = $taskIDStr[1];
|
|
}
|
|
}
|
|
|
|
$routeCmd = "route -query";
|
|
|
|
return true;
|
|
}
|