I did some changes recently but forgot to update here, try the below script and see if you still get the error:
Code: Select all
//Collect
"Collect items : collect"
getkey $Items, "items", "collected", "collect.ini";
getkey $Count, "count", "collected", "collect.ini";
focus;
$SelectedItemsPath= getinfo ("SelectedItemsPathNames", "|");
$CountSelectedItems= getinfo ("CountSelected");
set $Items, $SelectedItemsPath.$Items;
incr $Count, $Count, $CountSelectedItems;
setkey $Items, "items", "collected", "collect.ini";
setkey $Count, "count", "collected", "collect.ini";
status "Items collected=$CountSelectedItems (Total=$Count)", BF0000, progress;
focus c;
-
"Copy items to : copyto"
getkey $Items, "items", "collected", "collect.ini";
getkey $Count, "count", "collected", "collect.ini";
replace $ForTextMessage, $Items, "|",<crlf>;
text $ForTextMessage, , , "You have collected $Count items, you can choose where to copy them next.",w;
inputfolder $Path, <curpath>, Choose folder to copy items to;
copyto "$Path", $Items;
setkey , "items", "collected", "collect.ini";
setkey , "count", "collected", "collect.ini";
status "$Count Items Copied", , Ready;
focus c;
"Move items to : moveto"
getkey $Items, "items", "collected", "collect.ini";
getkey $Count, "count", "collected", "collect.ini";
replace $ForTextMessage, $Items, "|",<crlf>;
text $ForTextMessage, , , "You have collected $Count items, you can choose where to Move them next.",w;
inputfolder $Path, <curpath>, Choose folder to Move items to;
moveto "$Path", $Items;
setkey , "items", "collected", "collect.ini";
setkey , "count", "collected", "collect.ini";
status "$Count Items Moved", , Ready;
focus c;
"Backup items to : backupto"
getkey $Items, "items", "collected", "collect.ini";
getkey $Count, "count", "collected", "collect.ini";
replace $ForTextMessage, $Items, "|",<crlf>;
text $ForTextMessage, , , "You have collected $Count items, you can choose where to Back them up next.",w;
inputfolder $Path, <curpath>, Choose folder to Backup items to;
backupto "$Path", $Items;
setkey , "items", "collected", "collect.ini";
setkey , "count", "collected", "collect.ini";
status "$Count Items Backedup", , Ready;
focus c;
-
"Show collected items : show"
getkey $Items, "items", "collected", "collect.ini";
getkey $Count, "count", "collected", "collect.ini";
replace $ForTextMessage, $Items, "|",<crlf>;
incr $Count, $Count,0;
//text $ForTextMessage, , , "You have collected $Count items",w;
// Cancel = same message => no modification
$Response = input("You have collected $Count items (you can add/remove items)", , $ForTextMessage, w, $ForTextMessage);
// Update $Items
replace $Items, $Response, "<crlf>", "|";
// Update $Count
regexreplace $Tokens, $Items, "[^|]";
strlen $Count, $Tokens;
setkey $Items, "items", "collected", "collect.ini";
setkey $Count, "count", "collected", "collect.ini";
"Empty collected items : empty"
setkey 1, "exists", "tmp", "collect.ini";
self $path, path;
delete 0, 0, "$path\collect.ini";
status "Collected items emptied", , alert;
focus c;
-
"Edit script : edit"
self $ScriptFile, file;
Open $ScriptFile,w;
-
"Cancel"