-pop a window asking for client's name;
-grab a template out of <xydata>\NewItems (YourCompany_Form.rtf, in case) and copy it on current location;
-rename it as YourCompany_Form_Entered Name of the Client.rtf;
-rename diacritics as specified (adapt this to match your needs): "ñáàâãéèêíìîóòôõúùûç.,[]{}()>>naaaaeeeiiioooouuuc________".
NOTE: This step has a limitation regarding names collision. Later I will post a note asking for a solution (it seems to be a "rename s" issue, since "rename b" deals pretty well with name collisions when "/i" switch is part of the code - stay tuned!;
-do a basic camelCasing (if you don't like it, disable the "rename s, " /";" part using the "//" comment parameter;
-open the document and
-having the client's name waiting on clipboard!
Nice way to impress some people around there, huh?
Code: Select all
//ok - Clients Form
$in = input("Enter Client's Name:");
backupto "<curpath>", "<xydata>\NewItems\YourCompany_Form.rtf", 4;
selfilter "YourCompany_Form.rtf";
// "/i" to avoid name collision
rename b, "*_$in/i", "YourCompany_Form.rtf";
rename s, "ñáàâãéèêíìîóòôõúùûç.,[]{}()>>naaaaeeeiiioooouuuc________";
rename s, " /";
copytext $in;
status "Register Created: $in";
sendkeys"{enter}";
// open "<curpath>\<curitem>";
Tag - xyScript