ID:2430216
 
(See the best response by Kaiochao.)
Code:
Good evening I have a question, I would like to see if there is any way to eliminate an input (once it was formulated after a certain time.

For example:

var / mob / M = input (usr, "Hello", "What do you want") in list ("A", "B")

I would like that after some time the window of options A and B will be deleted


Problem description:

Best response
When you del the src of the proc the input is called in, the input window closes. So, you can create a new datum just for calling the input and then delete it whenever you want to close the window.
In response to Kaiochao
Could you cite an example please?
Nadrew wrote:
MyInput
proc
Input(caller=usr,caption="",title="",default="")
return input(caller,caption,title,default)


mob
verb/TestInput()
var/MyInput/I = new()
spawn(100) del(I) // Close after 10 seconds or so.
usr << I.Input(usr,"Hello!","Enter some text","Default text")


http://www.byond.com/forum/?post=272816
In response to Marekssj3
in writing through text can be through a list like the previous case? I decide between "Yes" and "No" and if I do not have time to erase
You'd want to add some other options than a basic input() call, you may want to add more procs to the MyInput datum like InputList() that takes a list as an argument or something along those lines.
I'm not sure i understand what you mean, but here is code. Also this code is just raw concept. This need some debugs like antispam input/alert method, or some default options in case when player don't chose any options from list, etc.
MyInput
New(time)
spawn(time) del src

proc
Input(caller=usr,caption="",title="",default="", list/L)
if(L) return input(caller,caption,title,default) in L as null|anything
else return input(caller,caption,title,default)

Alert(caller=usr,caption="",title="",Button1="Ok",Button2,Button3)
return alert(caller,caption,title,Button1,Button2,Button3)


mob
verb/TestInput()
var/MyInput/I = new(100) // Close after 10 seconds or so.
//usr << I.Input(usr,"Hello!","Enter some text","Default text")
//usr << I.Alert(usr,"Hello!","Enter some text","Ok", "No", "Cancel")
usr << I.Input(usr,"Hello!","Enter some text","Default text", list("Yes","NO", "Duck", "Santa Claus"))

Edited
@Down
You'd want to add the "as null|anything" bit so you get a cancel button.