|
Itchy Morpork
Registered User
Join date: 7 Jul 2008
Posts: 6
|
08-04-2008 12:55
hi,
i am showing some more ore less interesting sculptures on my island and i wanna give the visitors the possibility, to send me a feedback to my work via email. so i have this small script, which sends an email with a given text to my account when someone touches the object. but is it possible, that the users write an own text in SL and deliver it to my email account?
has anybody done this before?
string email_address = "somebody@example.com"; // who will receive the messages default { state_entry() { //Send an email to a normal email account llEmail( email_address, "Look it's an email subject line!", "Testing 1 2 3" ); } touch_start( integer num_detected ) { integer i = 0; // Send another email, telling who touched the prim. do llEmail( email_address, "No touching!", "I was defiled by: " + llDetectedName(i) + "\nKey: " + (string) llDetectedKey(i) ); while(++i < num_detected); } }
|
|
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
|
08-04-2008 13:48
The steps would roughly be:
* In the touch handler - Open a listener for that user's key (so you don't hear any other chatter around your sculpture) - Ask the user to type in his or her feedback - Start a guard timer (say 30 seconds)
* In the listen handler - Stop the timer - Pick up the text that the script heard, and email that to you. You can also include the name of the person, and any other other information you want - Close/deactivate the listener - Thank the user for his or her feedback
* In the timer handler - Close/deactivate the listener - Say something like "You took too long, timed out, if you want to leave feedback, please touch this button again"
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-04-2008 14:06
(Supposedly) one more viewer release and you should be able to pop up a text entry box when someone clicks, soliciting their feedback. The chat resulting from entering a message in the text box could easily be inserted into an e-mail. Hold your breath for llTextBox()!
|