Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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.
_________________
http://www.Aardwolf.com

Last edited by Vitae on Sun Sep 24, 2006 1:16 am; edited 2 times in total
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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.
_________________
http://www.Aardwolf.com

Last edited by Vitae on Sun Sep 24, 2006 1:15 am; edited 1 time in total
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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, ", ")
_________________
http://www.Aardwolf.com
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net