Gui Posted August 6, 2011 Posted August 6, 2011 (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 August 6, 2011 by Gui
Developers Jos Posted August 6, 2011 Developers Posted August 6, 2011 What exactly are you trying to accomplish because you created your 3rd thread on this but haven't really asked any clear question about what you really need? 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.
Gui Posted August 6, 2011 Author Posted August 6, 2011 (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 August 6, 2011 by Gui
Developers Jos Posted August 6, 2011 Developers Posted August 6, 2011 (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 August 6, 2011 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.
ProgAndy Posted August 6, 2011 Posted August 6, 2011 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
Gui Posted August 6, 2011 Author Posted August 6, 2011 Maybe start reading here:WOO Thanks! Exactly what I needed.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now