Scripting: goes OOP? Provide auto count of functions
Posted: 31 Jul 2010 21:06
Question to Don:
I am not sure if i can make myself clear and i don't know if you have this info, but...
... I guess for commands like
listfolder()
replace()
inputselect()
you already could provide an count to us? Or at least you would be able to do so?
So we can let be our script KISS if you would auto generate an var
with name of the original var but added an "Count"
where you give us the amount of iteration you had done in the back ground.
Examples:
$ITEMS = listfolder();
msg "Items in folder: " . $ITEMS_count;
$ITEMS = replace();
msg "Needle found: " . $ITEMS_count . " times";
where $ITEMS_count is an auto generated var based on the user var $ITEMS
The var name is of course only an example an could be something like _XYAutoCount to not compromise existent scripts.
What do you think?
I am not sure if i can make myself clear and i don't know if you have this info, but...
... I guess for commands like
listfolder()
replace()
inputselect()
you already could provide an count to us? Or at least you would be able to do so?
So we can let be our script KISS if you would auto generate an var
with name of the original var but added an "Count"
where you give us the amount of iteration you had done in the back ground.
Examples:
$ITEMS = listfolder();
msg "Items in folder: " . $ITEMS_count;
$ITEMS = replace();
msg "Needle found: " . $ITEMS_count . " times";
where $ITEMS_count is an auto generated var based on the user var $ITEMS
The var name is of course only an example an could be something like _XYAutoCount to not compromise existent scripts.
What do you think?