(AGK version: 108.19)
Submitted: 2014-03-06 07:04:48
Function Input(textin$,length)

    SetCursorBlinkTime(0.5)
    SetTextInputMaxChars(length)
    StartTextInput(textin$)

    do
        sync()
        state=GetTextInputState()
        c=GetLastChar()
        if GetTextInputCompleted()
            if GetTextInputCancelled()
                text$=textin$
                exit
            else
                text$=GetTextInput()
                exit
            endif
        endif

    loop

    StopTextInput()
    sync()

endfunction text$
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.