Modify

Opened 4 weeks 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)

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.