Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Questions - Read-Only and Word Wrap
#6
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
Code:
Copy      Help
[email]
pub_mailto="name@www.site.org, name2@www.site.org, name3@site.org, name4@site.org"

Running this macro:
Macro
Code:
Copy      Help
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:
Code:
Copy      Help
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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)