|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Sat Sep 23, 2006 6:20 am
#VAR/#ADDITEM & @ Char |
So, I'm working on some diff methods with that mailer over in finished scripts.
Making it so that you can select multiple people to send an email to.
#PICK {p:Who are you sending this to~:} {Myself:#ADDITEM EmailTo {"me@gmail.com"}} {Someoneelse:#ADDITEM EmailTo {"Someoneelse@gmail.com"}} {Group:#ADDITEM EmailTo {"me@gmail.com, Someoneelse@gmail.com, YetAnotherSomeone@gmail.com"}}
This is populating the EmailTo Var fine, but I've been stuck for about 3hrs trying different ways to get it to not strip the @gmail.com when I try to convert the |'s into , 's (thats a comma with a space after it)
#var EmailTo {me@gmail.com|someone@gmail.com|someoneelse@gmail.com}
#var EmailTo {%replace( @EmailTo, "|", ", ")}
#forall @EmailTo {#var EmailTo2 {%i", "@EmailTo2}}
winds up with:
me, someone, someoneelse
and everything that i've tried winds up the same way.
How the heck do I get it to NOT strip everything after the @?
I also tried ~@ ~~@ ~@@ ~~@@ methods.
I even tried using %char( 64) for the @, but that didn't work.
It's got to be something simple, but I can't seem to figure it out. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Sep 23, 2006 6:47 pm |
Use %expand(). It will be one of the negative-number options as shown in help.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Sat Sep 23, 2006 7:51 pm |
nope don't work
Code: |
#PICK {p:Who are you sending this to~:} {Myself:#additem EmailTo {"me@gmail.com"}} {AltEmail:#additem EmailTo {"Someoneelse@gmail.com"}} {OMG:#additem EmailTo {"YetAnotherSomeone@gmail.com"}}
#show %expand( @EmailTo, 1)
#show %expand( @EmailTo, 0)
#show %expand( @EmailTo, -1)
#show %expand( @EmailTo, -2)
#show %expand( @EmailTo, -3)
me@gmail.com|Someoneelse@gmail.com|YetAnotherSomeone@gmail.com
me|Someoneelse|YetAnotherSomeone
@EmailTo
me|Someoneelse|YetAnotherSomeone
@EmailTo
|
1 is the only one that actually show's the @gmail, but there's still no , in there. |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Sat Sep 23, 2006 9:17 pm |
Well, this works, but it's rather ugly.
Code: |
#PICK {p:Who are you sending this to~:}
{Myself:#additem EmailTo {"~"me@gmail.com~""}}
{AltEmail:#additem EmailTo {"~"someone@gmail.com~""}}
{OMG:#additem EmailTo {"~"someoneelse@gmail.com~""}}
{Family:#additem EmailTo {"~"me@gmail.com~""};
#additem EmailTo {"~"someoneelse@gmail.com~""};
#additem EmailTo {"~"someone@gmail.com~""}
}
#Var EmailTo %expandlist( @EmailTo, ", ") |
|
|
|
|
|
|