llInputBox
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
12-20-2005 13:09
key llInputBox(key avatar, string msg, string default, integer hide)If the user presses "submit", a dataserver event is triggered; the dataserver key is the key used to create the input box, the dataserver string is the data entered in the input box. //Silly example script key query;
default { state_entry() { query = llInputBox(llGetOwner(), "Please input your favorite animal species", "cabbit", FALSE); } dataserver(key queryid, string data) { if(queryid == query) { if(llToLower(data) != "cabbit") llOwnerSay("How could you like "+data+"s more then cabbits? Cabbits are the best."); else llOwnerSay("Aren't cabbits the greatest?"); } } }
llInputBox(llGetOwner(), "Please enter your password", "Monkeys", TRUE); llInputBox(llGetOwner(), "Please enter your search term", "Cabbit", FALSE);
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
|
Nargus Asturias
Registered User
Join date: 16 Sep 2005
Posts: 499
|
12-20-2005 18:39
I sure want that much 
_____________________
Nargus Asturias, aka, StreamWarrior Blue Eastern Water Dragon Brown-skinned Utahraptor from an Old Time
|
|
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
|
12-20-2005 22:28
Great idea. <stamp>
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-21-2005 11:39
Alternate design, to be more consistent with llDialog, and to also allow cross-script use (I often use llDialog to generate messages for other scripts, many of which I don't have the source to and which only listen to llGetOwner()) and cross-object use without relays.
llInputBox(key avatar, string msg, string default, integer channel);
This would work like llDialog, when you click submit the message would be sent on the named channel.
Alternatively:
llInputDialog(key avatar, string msg, string default, list buttons, integer channel);
This would extend the existing llDialog to include an input box above the buttons.
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
12-21-2005 12:36
Wouldn't it be easier just to keep llDialog and use a constant in place of the list of buttons? llDialog(llGetOwner(), "Please enter your username", INPUTBOX_TEXT, channel);
AND
llDialog(llGetOwner(), "Please enter your password", INPUTBOX_PASSWORD, channel); Although ideally if they were doing this, they should replace the listens required with a simpler dialog() event which is called when the dialogue choice is made. The function would simply return what the user entered as it's message to the listen (or dialog) event.
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
12-21-2005 13:23
How bout including a flag to allow restricting input to Anything, Integer, Float?
Toss in some range limits and field lengths, save people coding time and make scripts simpler.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-21-2005 14:50
From: Haravikk Mistral Wouldn't it be easier just to keep llDialog and use a constant in place of the list of buttons? That would work, you could enter the text and then have another dialog drop down with the buttons. I'd rather be able to combine the buttons with the dialog (like [submit reply] and [preview post]). I like having llDialog listen-based, because it lets me automate scripted objects and attachments that I already have using the dialog.
|
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
12-21-2005 15:17
Hmm, I didn't think about that...well I suppose it would have to a be a new function anyway as many scripts would break nowadays. So llDirectDialog can deal with that stuff then  I kind of get what you mean about buttons, but I'm unsure how useful it would be beyond having surveys with an "Other (please specify)" option. But yeah, definitely would like this idea!
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-21-2005 16:24
From: Haravikk Mistral I kind of get what you mean about buttons, but I'm unsure how useful it would be beyond having surveys with an "Other (please specify)" option. But yeah, definitely would like this idea! How about this dialog? There's a lot of scripts that take commands like "hug Avatar" or "bite Avatar"... Enter the name of the avatar you want to...
[ ]
( Hug ) ( Bite ) ( Noogie ) ( Ignore )
So if I had a touch-script in a HUD that did: llInputDialog(llgetOwner(), "Enter...", ["Hug ", "Bite ", "Noogie "], last_avatar, 1); And if I entered your name and clicked "Bite" it did the equivalent of "/1Bite Haravikk", I could use the "Dark Gift Bracelet" I got at some Goth store SO much more easily...
|