Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: CrAz3D on August 16, 2003, 12:58 PM

Title: User type strings
Post by: CrAz3D on August 16, 2003, 12:58 PM
vb 6

I am trying to include user type strings (%s, %e, etc...) into a greeting function or just basic commands, how would I go about this.
Title: Re:User type strings
Post by: Camel on August 16, 2003, 01:41 PM
I think what you are asking is how to replaces "%s" and "%e" from the 'greeting format' with associated strings based on the user. If I'm correct on that, you can use Replace().
Title: Re:User type strings
Post by: CrAz3D on August 16, 2003, 02:19 PM
oh, ok then.  Thnx

If that doesn't work I'm trying to do basically the same thing as stealthbot's greeting variables.
Title: Re:User type strings
Post by: CrAz3D on August 16, 2003, 03:14 PM
The replace() worked, thnx again Camel.
Title: Re:User type strings
Post by: warz on August 17, 2003, 02:49 PM
I posted a useful example that I wrote awhile back showing how to do exactly what you're asking.

Check it out: http://tks.slacktech.com/source/vb/My%20Form%20Examples/custom_variables.frm

Just append format_message somewhere in your send function and it'll replace any available variables, all the time.
Title: Re:User type strings
Post by: CrAz3D on August 17, 2003, 03:09 PM
I don't know that I'd want it to do that but thnx.
Title: Re:User type strings
Post by: warz on August 17, 2003, 05:22 PM
It doesn't _have_ to.