Following script will give an idea:
Code: Select all
$ep = ",";
$info = <clipboard>;
$test = gettoken("$info", "count", "<crlf>");
perm $p_nm1, $p_nm2, $p_nm3, $p_nm4, $p_nm5, $p_nm6, $p_nm7, $p_nm8, $p_nm9;
$p_nm = "";
foreach($line, $info, "<crlf>")
{
$index = 1;
WHILE ($index != "9") {
$name = gettoken("$line", "$index", " ");
IF ($name == "") { break; }
ELSEIF ($name != "") { }
//HERE IS THE PROBLEM!
$p_nm $index = "$p_nm" . "$index" . "$name" . "$ep"; //HERE IS THE PROBLEM!
$index++;
//from now on, unfinished, ie, properly stopping at permanent var nr. 9 and store items, etc - not a problem
}
}
text "$p_nm1<crlf><crlf>$p_nm2<crlf><crlf>$p_nm3<crlf><crlf>$p_nm4<crlf><crlf>$p_nm5<crlf><crlf>$p_nm6<crlf><crlf>$p_nm7<crlf><crlf>$p_nm8<crlf><crlf>$p_nm9<crlf>"
releaseglobals;
status "done!";Basically each permaVar must store items respectively to their positions on a given phrase, so
Products ($p_nm1) of ($p_nm2) Stanford ($p_nm3) Mill ($p_nm4)
Lakeshore ($p_nm1) Heavy ($p_nm2) Duty ($p_nm3) Products ($p_nm4)
then
$p_nm1 = Products, Lakeshore
$p_nm2 = of, Heavy
$p_nm3 = Stanford, Duty
$p_nm4 = Mill, Products
Any help will be appreciated.
XYplorer Beta Club