Jump to content

Recommended Posts

Posted (edited)

If you wanted to, would you use PeekConsoleInput() [http://msdn.microsoft.com/en-us/library/ms684344%28v=vs.85%29.aspx], or something else?

You'd need to enable user input into the Console App, but it doesn't work. I've tried:

$aCall = DllCall("kernel32.dll", "ptr", "CreateConsoleScreenBuffer", "dword", BitOR(0x40000000, 0x80000000), "dword", 0x00000002, "ptr", 0, "dword", 1, "ptr", 0)
    Local $hBuff = $aCall[0]
    $aCall = DllCall("kernel32.dll", "int", "SetConsoleMode", "ptr", $hBuff, "dword*", "ENABLE_WINDOW_INPUT") ; 0x0008 (ENABLE_WINDOW_INPUT)
    MsgBox(0,'', $aCall[0])

Thanks,

GUI

Edited by Gui
Posted (edited)

*Sigh* Sorry for that. You can delete them if you want.

What I'm trying to accomplish is quite simple to understand. First, a Console Window is created using dllcalls & kernel32. After this, I want the user / me to be able to type into the console. This isn't the same as ConsoleWrite, etc. I mean literally as if it was a cmd. Similar to "Prompt" command with batch files. For some reason, once opened, the Console Window won't accept text/inout from keystrokes. Hopefully that's understandable.

GUI

PS: In the future, i'll keep one thread. Sorry about that.

Edited by Gui
  • Developers
Posted (edited)

So you need to be able to interact with a CMD window...right?

Have you seen the STDINWRITE/STDOUTREAD commands and the examples in the Helpfile?

You could still use InputBox() with a CUI script .

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

Maybe start reading here:

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...