I am looking at some older example tbx files that I found on my drive. There is a note readme:
“This is a simple demo to show a way to replace straight single/double quotes with their ‘smart’ equivalents.
In applying these techniques in a real world situation, it is worth noting that constantly running a lot of command line code all the time is probably not ideal for the agent update cycle. Think about approaches like having the code in an agent that can be run at low priority or only turned on and run when needed.”
There are three other notes. The first is “quotify” and its $text is set to a SED statement that does clever things with quotes. The next is TestText that holds a short text containing dumb quotes and a rule:
$MyString = runCommand($Text(quotify),$Text);
The last note is named “out” and displays the output.
Looking at the rule I believe that the text of quotify is being run with $Text as a command and the results are being stored in attribute $MyString. But this is not what happens, the attribute $MyString remains blank while the note “out” is populated with the result. I wonder how this happens?quotify.tbx (55.4 KB)
Thanks Paul, that makes more sense although the copy of Quotify was recently downloaded as the link is still live so it seems the original was missing the rule.
From where was the file downloaded? In the like of the above, it might be possible to fix it to save confusion for others trying it out? I can certainly see copies in my demo-back and in the demo folder on acrobatfaq.com. I’ll certainly fix those.
I’d suggest adjusting the file for future users, and address the warning about persistently active Rules in the READ ME note, by using a Stamp in place of the Rules – the stamp can get its source code from /Codes/quotify. That way READ ME can address what I think is the real point of the demo: using code notes is a useful way to work with Stamps, Rules, Edicts, Actions, etc.
I’m ont. I’ve found the file in the old demo bank. The overall collection, some 60+ TBX ideally need re-setting for use in the v6+ UI but that’s weeks of work & testing and is spare time I just don’t have right now. However, I’m working on the ‘Quotify’ TBX as I write.