09-01-2008, 04:55 AM
Thanks
My fault, I didn't explain it well. One problem was that I wanted a string that was too long to fit in the Edit box display to word-wrap to new lines. This I got working as described above.
The second problem - that I still have - is that I need to restore the str output back to the single-line format b/c is incorrectly written back to the INI file as a multi-line, breaking the INI format.
For example:
wrap.ini
Running this macro:
Macro
Results in the following output:
The problem: I need to restore/condense/reformat the string output back to the Original formatting (i,e., a single line of email addresses, each separated by a comma and space - like what is in the INI file above. Replacerx for "[]" didn't work. Also tried repx with CR and LF codes with no luck.
Any help is appreciated!
S
EDIT: I should mention that the actual macro (as opposed to this sample) is for adding/removing names from the list, so simply pointing back to the original string won't work.
My fault, I didn't explain it well. One problem was that I wanted a string that was too long to fit in the Edit box display to word-wrap to new lines. This I got working as described above.
The second problem - that I still have - is that I need to restore the str output back to the single-line format b/c is incorrectly written back to the INI file as a multi-line, breaking the INI format.
For example:
wrap.ini
[email]
pub_mailto="name@www.site.org, name2@www.site.org, name3@site.org, name4@site.org"
Running this macro:
Macro
out
str pub_mailto
out "ORIGINAL INI VALUE"
rget(pub_mailto "pub_mailto" "email" "c:\wrap.ini")
out pub_mailto
out ""
out "WORD WRAP FOR MULTI-LINE EDIT BOX FORMATTING"
pub_mailto.wrap(40 "" ",")
out pub_mailto
Results in the following output:
ORIGINAL INI VALUE
name@www.site.org, name2@www.site.org, name3@site.org, name4@site.org
WORD WRAP FOR MULTI-LINE EDIT BOX FORMATTING
name@www.site.org, name2@www.site.org,
name3@site.org, name4@site.org
The problem: I need to restore/condense/reformat the string output back to the Original formatting (i,e., a single line of email addresses, each separated by a comma and space - like what is in the INI file above. Replacerx for "[]" didn't work. Also tried repx with CR and LF codes with no luck.
Any help is appreciated!
S
EDIT: I should mention that the actual macro (as opposed to this sample) is for adding/removing names from the list, so simply pointing back to the original string won't work.