Modify

Opened 9 months ago

#4042 new Feature Request

Native console-read (prompt) function

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: console prompt read Cc:

Description

Would be nice to have a build-in console-read function (prompt user and return answer).

A simple function like this:

func Prompt($msg = "")

Local $sResult
Local $sText
if not $msg = "" then ConsoleWrite ($msg & ": ")
While True

$sText = ConsoleRead()
If @error Then ExitLoop
if StringRight($sText, 1) = @LF then

$sResult &= $sText
ExitLoop

EndIf
Sleep(20)

WEnd
return $sResult

EndFunc

I think write and read to/form console in a console-app is a very often-used feature

Attachments (0)

Change History (0)

Modify Ticket

Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.